Developers - REST API v1

Retrieves a list of orders

URL

GET https://api.e-guma.ch/v1/vouchers/orders.json?apikey={api-key}

Parameters

apikey required
created_at_after Show orders created at or after date (format: 2019-06-04T23:15:14).
created_at_before Show orders created before date (format: 2019-07-04T23:15:14).

Returns

id The ID of the order.
created_at The autogenerated date and time (ISO 8601 format) when the order was created. E.g. 2019-06-03T19:16:43
order_number The order number
status completed or cancelled
currency The three-letter code (ISO 4217 format) for the currency. Each shop only supports one currency.
language Language as a two-letter code (ISO 639-1).
location web, local or import
discount_in_cents The total discounts applied to the price of the order.
grand_total_in_cents The sum of all line item prices, shipping fee and added discounts.
customer Customer, see customer object below for details.
order_lines List of order lines, see order line object below for details.
payments List of payments, see payment object below for details.

Customer object

id The ID of the customer.
title Mr, Mrs or Company
first_name First name
last_name Last name
company Company name
street Street
zip Zip code
city City
country Country as two-letter code (ISO 3166-1 alpha-2)
email Email address
accepts_marketing Whether the customer consented (Double Opt-in) to receive email newsletters.
phone Phone number

Order line object

product_id The ID of the voucher product.
name The name of the voucher (e.g. Candle Light Dinner).
unit_price_in_cents Unit Price
quantity Quantity
total_price_in_cents quantity x unit_price_in_cents

payment object

payment_id The ID of the payment method.
name The name of the payment method. E.g. Credit Card
amount_in_cents Amount
is_complimentary Indicates if a payment is complimentary.

Example

Request (GET)
https://api.e-guma.ch/v1/vouchers/orders.json?created_at_after=2019-05-01T00:00:00&created_at_before=2019-05-31T23:59:59&apikey=5bb668e394f2811f3ca4a9db
Response
[
  {
    "id": "b2fd3b39-c519-48b0-a141-7d020f10e607",
    "created_at": "2019-06-03T19:16:43",
    "order_number": "GI10012",
    "status": "completed",
    "currency": "CHF",
    "language": "de",
    "location": "web",
    "discount_in_cents": 2000,
    "grand_total_in_cents": 3000,
    "customer": {
      "id": "825fe15a-ccef-440c-a9e9-6ee32f3eb2e7",
      "title": "Mr",
      "first_name": "Christoph",
      "last_name": "Thomet",
      "company": "Idea Creation GmbH",
      "street": "Walchestrasse 15",
      "zip": "8006",
      "city": "Zürich",
      "country": "CH",
      "email": "ch.thomet@e-guma.ch",
      "accepts_marketing": false,
      "phone": "044 500 54 00"
    },
    "order_lines": [
      {
        "product_id": "13a7b4a7-2256-4f23-b690-2d562d98e171",
        "name": "Wertgutschein",
        "unit_price_in_cents": 5000,
        "quantity": 1,
        "total_price_in_cents": 5000
      }
    ],
    "payments": [
      {
        "payment_id": "1",
        "name": "Postkarte / Kreditkarte",
        "amount_in_cents": 3000,
        "is_complimentary": false
      }
    ]
  }
]

Kontakt

Idea Creation GmbH
Walchestrasse 15
8006 Zürich
Tel. +41 44 500 54 00
info@e-guma.ch

Support
support@e-guma.ch
TeamViewer herunterladen

Social Media