Single Voucher Order
GET https://api.e-guma.ch/v1/vouchers/orders/{id}.json?apikey={api-key}
Parameters
api-keyrequired |
Return
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 |
updated_at | The date and time (ISO 8601 format) when the order was last modified. This value changes when one of the following events happens: - An order line (voucher) gets cancelled - An order gets cancelled - A value of the customer object gets updated When an order is created then updated_at has the same value as created_at. |
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 or local |
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 address | |
accepts_marketing | Whether the customer consented (Double Opt-in) to receive email newsletters. |
double_opt_in_confirmed_at | If the customer consented to receive the email newsletter then the date and time (ISO 8601 format) of the Double Opt-in will be returned. Otherwise this value will be null. |
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
GET https://api.e-guma.ch/v1/vouchers/orders/c004033d-ded1-4b74-958f-76ef47e747d6.json?apikey=5bb668e394f2811f3ca4a9db
{
"id": "c004033d-ded1-4b74-958f-76ef47e747d6",
"created_at": "2019-07-29T14:41:05",
"updated_at": "2019-07-29T14:41:05",
"order_number": "GI10023",
"status": "completed",
"currency": "CHF",
"language": "de",
"location": "web",
"discount_in_cents": 0,
"grand_total_in_cents": 30000,
"customer": {
"id": "4c3150ad-7117-4516-aa7c-2ca6d5c7a597",
"title": "Mr",
"first_name": "Christoph",
"last_name": "Thomet",
"company": "Idea Creation GmbH",
"street": "Walchestrasse 15",
"zip": "8006",
"city": "Zürich",
"country": "CH",
"email": "[email protected]",
"accepts_marketing": true,
"double_opt_in_confirmed_at": "2019-07-29T12:13:53",
"phone": "044 500 54 00"
},
"order_lines": [
{
"product_id": "13a7b4a7-2256-4f23-b690-2d562d98e171",
"name": "Wertgutschein",
"unit_price_in_cents": 10000,
"quantity": 3,
"total_price_in_cents": 30000
}
],
"payments": [
{
"payment_id": "1",
"name": "Postkarte / Kreditkarte",
"amount_in_cents": 30000,
"is_complimentary": false
}
]
}
Updated almost 2 years ago