Single Voucher Order
GET https://api.e-guma.ch/v1/vouchers/orders/{id}.json?apikey={api-key}Parameters
| Parameter | Description |
|---|---|
api-key required |
Return
| Parameter | Description |
|---|---|
| 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 an order line (voucher) gets cancelled, an order gets cancelled, a value of the customer object gets updated, or fulfillment_status changes after the order was created (marked as shipped, that mark reverted, or a voucher that was held until payment is released once the invoice is paid). When an order is created then updated_at has the same value as created_at, including the fulfillment status assigned at creation. Poll updated_at_after to follow orders that become ready to ship and orders that have been shipped. |
| order_number | The order number |
| status | completed or cancelled |
| fulfillment_status | none, unfulfilled or fulfilled. unfulfilled means the order is waiting to be marked as shipped (postal shipping or pickup). fulfilled means it was marked as shipped, or it never needed shipping (print at home, or a counter sale). none means the voucher is held until the invoice is paid. The invoice itself has already been sent. Once that invoice is paid, print at home moves to fulfilled and postal shipping to unfulfilled. |
| 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 |
| is_paid | Whether the order is fully paid. Same meaning as the Paid column in the Backoffice CSV order export. Also returned for cancelled orders; to follow up on unpaid invoices, additionally filter status != "cancelled". |
| discount_in_cents | The total discounts applied to the price of the order. |
| discount_comment | The comment of the discount payment (e.g. the reason for a discount). Discount payments are excluded from the payments array because their amount is already included in discount_in_cents. null when there is no discount comment. |
| shipping_method | postage, pick_up or print_at_home for online orders (location = web). null for counter sales and imports, which have no shop shipping choice. postage is postal shipping. A pickup order is pick_up even when the merchant prints the vouchers. To list postal orders that still need shipping, filter shipping_method = postage and fulfillment_status = unfulfilled. |
| 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 template or product. |
| name | The name of the voucher (e.g. Candle Light Dinner) or product. |
| 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 |
| comment | The comment of the payment method (e.g. the reason for a complimentary booking). null when empty. |
| 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",
"fulfillment_status": "fulfilled",
"currency": "CHF",
"language": "de",
"location": "web",
"is_paid": true,
"discount_in_cents": 0,
"discount_comment": null,
"shipping_method": "print_at_home",
"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": "Zurich",
"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",
"comment": null,
"amount_in_cents": 30000,
"is_complimentary": false
}
]
}Updated 8 days ago
