Download OpenAPI specification:Download
API for cart and orders
- new add support for order item status property
order.items.status
. The new property can be included when creating and updating drafts items and when updating an order.
- new support updating
order.external_ids
- Extend order item with optional
external_id
property
- new support updating
order.itinerary
- Extend the draft with
options.generate_order_id=ALPHANUMERIC_9_RESERVE
The draftorder.order_id
will be set when the new option is used.
- Extend the draft options with
multiple_authorizations
Useoptions.multiple_authorizations
to enable support for multiple authorizations on order items.- Require
authorization_id
to be included in captures, refunds and cancellations if order was created withoptions.multiple_authorizations
enabled.
- new support filter orders by:
itinerary_travel_mode
,itinerary_arrival_address
,itinerary_departure_address
anditems_discount_lines_discount_type
.
- Extend the Order itinerary with new properties
- Add support for
route_id
andvehicle_id
.- Add support for
external_ids
inarrival_address
anddeparture_address
- new suport
include_events
when updating an order
- PUT /v1/accounts/{aid}/shopping/orders/{id}
- POST /v1/accounts/{aid}/shopping/orders/{id}/comments
- POST /v1/accounts/{aid}/shopping/orders/{id}/cancel
- POST /v1/accounts/{aid}/shopping/orders/{id}/close
- POST /v1/accounts/{aid}/shopping/orders/{id}/open
- DELETE /v1/accounts/{aid}/shopping/orders/{id}/comments/{comment_id}
- new endpoint for deleting comment
- Request for creating authorization, capture, refund or cancellation can fail with
409 Conflict
error.
- Extend the draft options to specify TTL for the order Use
options.order_time_to_live
to set expiry for when the order and its draft data will be removed.
- Extend payment operations items to include
payout
for order items that have a payout rule The new property shows how the payment operation item amounts should be splitt by its payout rule destinations
- Extend endpoint for listing draft and orders to support currency filter
- Extend the draft options to support replace of existing order. Use
options.replace="order"
option to replace an order when the draft is completed. This option is only valid for existing orders that have no payment operations registered (when draft is completed)
Extend
include_events
query parameter to support multiple values. The parameter accept now:
false
true
api-event
service-event
.
api-event
will be excluded from the store/customer endpoints:
- Support adding comments to an order
- Extend the draft options to allow alphanumeric short order_id. Use
options.generate_order_id
to control the ID format for generatedorder.order_id
.
- Create order with custom order_id. The new property is only supported when creating draft with
split_draft=false
. Theorder.order_id
will be set toorder.id
if no order_id is provied.
- Extend endpoint for listing draft and orders to support filtering
- Extend order with
external_ids
- Extend order with
external_links
.
- Extend order itinerary and attachments
- Add
name
andid
to itineraryarrival_address
and `departure_address. Make all address properties options- Add
line_ids
andid
to itinerary and attachments- Add
operator
to itinerary- Extend
itinerary.travel_mode
withCUSTOM
- Extend order events with
event_type
to support event typesapi-event
andservice-event
.
- Extend order event with
draft_id
, a readOnly property that are included in events where the order was created or updated by a draft.
- Extend order with
itinerary
andattachment
for including travel details
- Extern order items with readOnly
version
property that will be set when the draft order item is added or updated.
- Extend order payment operation definition with
processed_by
andpayment_details
.
- Extend the draft options to allow more control for how payout is configured
- Extend the draft order items to support including
manual_payout
to support use of any payout rule when calculating the split for the order items.
- Extend order item with
attachment
. Add support for including details about car, bus and train reservation as attachment in order items.
- Add
events
to draft. A event will be added to the draft events list when the draft is updated.- Add
payout
option to enable calculating the payout for the order items store id. See Billing API- Add support for dynamic payout rules via
options.payout.rules
.- Add
order_id
option to allow creating a draft that will be added to an existing order.- Add
split_draft
option to allow one-to-many mapping between draft and order- Add support for including store when creating a draft.
- Add support for adding draft items with
reversed_reason
property. Use the property in case when an item should be reversed and the payment refunded.- Add support for item
related_item.type=reversed
, that should be used when reversing an existing item.- Add support for negative item
gross_amount
to support reversing items.
- Include authorizations and cancellations in order details
- Include
payment_details
to the order.
sessions Add support for creating sessions for and order
refunds Require items to be specified when creating a refund
captures Require items to be specified when creating a capture
cancellations Add support for creating cancellations for an order
authorizations Add support for creating authorizations for an order
orders Extend order definitions with Discounts
orders > store orders add support for
include_events
on order requests. The order eventstate
andevents
list will be included in the response.
- extend draft definition with optional
options.serial_order_number_suffix
property.
- extend order definition with
courier_id
andpickup_at
that can be set and updated after the order is created- extend order definition with
delivery_id
that can be set after the the order is created- extend order definition with optional
pre_order
property- extend order definition with optional
type
property.- extend order shipping_address and billing_address property with optional
comment
property that can be used for additional information needed for the address.
- allow scopes
read:shopping:/orders/ANY/events
write:shopping:/orders/ANY/events
- filter by
status
: open, completed, deleted- filter by
created_at.gte
andcreated_at.lte
- filter by
status
: open, closed, cancelled- filter by
payment_status
: pending, partially_paid, paid, partially_refunded, refunded- filter by
created_at.gte
andcreated_at.lte
- filter by
status
: open, closed, cancelled- filter by
payment_status
: pending, partially_paid, paid, partially_refunded, refunded- filter by
created_at.gte
andcreated_at.lte
- filter by
status
: open, closed, cancelled- filter by
payment_status
: pending, partially_paid, paid, partially_refunded, refunded- filter by
created_at.gte
andcreated_at.lte
- accept any
customer.id
format
- require
amount
andprocessed_at
when creating a refund- require
amount
andprocessed_at
when creating a capture
- Add endpoint for list orders for a store
- Add endpoint for get order for a store
- Remove uuid format requirement on customer_id path parameter
- remove support for
apply_discounts
query parameter, the parameter will only be supported from endpoints updating the draft order.
- change the response to include one or more orders created from the draft.
Rename the API, Shopping API, all endpoints will now be prefixed with
/v1/accounts/{aid}/shopping/
- Add
salesperson_id
andsalesperson_name
properties- Add
delivery_at
property for specifying when the order should be delivered (in the future)
- Require
percentage
intax_lines
for an order item- Add
quantity
property toitem.additions
, and allow negativegross_amount
- Add
related_item
property that can be used to create a relationship between two items- Add
description_alias
, shorter item description for receipt- Add
salesperson_id
andsalesperson_name
property
- Add
metadata
property that can be used to included additional key/values on order items.- Add
additions
array property. The property can be used to describe customization the customer want to be included with the order item.- Add
comment
property for recording customer comments on the item
- Add
comment
property for recording customer comments on the order
Use webhooks to get notification on shopping events. See Create new subscription for details on how to create a webhooks subscription
Following event types are supported
Event | Description |
---|---|
shopping_draft_add |
new draft order created |
shopping_draft_update |
existing draft order updated |
shopping_draft_complete |
draft completed, includes orders created |
shopping_order_update |
existing order updated |
shopping_order_event_add |
new event added to order |
Use this resource to transition the draft order into an Order. A draft with multiple sales locations will transition into one order per sales location.
scopes:
aid required | string <^[PT]{1}\d{8}$> = 9 characters An id that uniquely identifies the account. |
id required | string <uuid> The resource identifier string |
draft order resource
{ }
{- "id": "bd04c959-d159-49b4-a096-2d84e014a8da",
- "created_at": "2019-08-24T14:15:22Z",
- "created_by": "bd04c959-d159-49b4-a096-2d84e014a8da",
- "updated_at": "2019-08-24T14:15:22Z",
- "deleted_by": "bd04c959-d159-49b4-a096-2d84e014a8da",
- "deleted_at": "2019-08-24T14:15:22Z",
- "status": "open",
- "_links": [
- {
- "href": "string",
- "rel": "draft"
}
], - "orders": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "created_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
- "updated_at": "2019-08-24T14:15:22Z",
- "deleted_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
- "deleted_at": "2019-08-24T14:15:22Z",
- "cancelled_reason": "customer",
- "cancelled_by": "bd04c959-d159-49b4-a096-2d84e014a8da",
- "cancelled_at": "2019-08-24T14:15:22Z",
- "closed_by": "bd04c959-d159-49b4-a096-2d84e014a8da",
- "closed_at": "2019-08-24T14:15:22Z",
- "status": "open",
- "payment_status": "pending",
- "customer": {
- "first_name": "John",
- "last_name": "Doe",
- "id": "string",
- "gender": "male",
- "email": "customer@example.com",
- "metadata": {
- "dob_year": 1985
}, - "phone_number": "+4799999999",
- "addresses": [
- {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO",
- "type": "string",
- "custom_type": "string"
}
], - "pays_tax": false,
- "date_of_birth": "1990-09-20",
- "favorite_store": "string",
- "company": {
- "organization_number": "123456789MVA",
- "bussiness_name": "TKP tech AS",
- "department": "sales department",
- "industry": "computer industry",
- "website": "string",
- "number_of_employees": "string"
}, - "marketing_consent": {
- "sms": {
- "consent": true,
- "updated_at": "2018-01-12T13:42:00Z"
}, - "email": {
- "consent": true,
- "updated_at": "2018-01-12T13:42:00Z"
}
}, - "status": "string",
- "term": {
- "id": "string"
}, - "type": "customer"
}, - "gross_amount": 59800,
- "net_amount": 47840,
- "total_discount": 23130,
- "total_manual_discount_amount": 0,
- "shipping_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO",
- "first_name": "John",
- "last_name": "Doe",
- "comment": "5th floor, use doorbell."
}, - "billing_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO",
- "first_name": "John",
- "last_name": "Doe",
- "comment": "5th floor, use doorbell."
}, - "metadata": { },
- "comment": "string",
- "salesperson_id": "string",
- "salesperson_name": "string",
- "delivery_at": "2019-08-24T14:15:22Z",
- "pickup_at": "2019-08-24T14:15:22Z",
- "courier_id": "string",
- "pre_order": true,
- "time_to_live": 94672800,
- "itinerary": [
- {
- "id": "string",
- "operator": "string",
- "arrival_address": {
- "id": "string",
- "name": "string",
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO",
- "external_ids": [
- {
- "id": "string",
- "source": "string",
- "description": "string"
}
]
}, - "arrival_at": "string",
- "departure_address": {
- "id": "string",
- "name": "string",
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO",
- "external_ids": [
- {
- "id": "string",
- "source": "string",
- "description": "string"
}
]
}, - "departure_at": "string",
- "travel_mode": "BUS",
- "route_id": "string",
- "vehicle_id": "string",
- "summary": "string",
- "distance": {
- "value": 0
}, - "duration": {
- "value": 0
}, - "tickets": [
- {
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "passenger_id": [
- "string"
]
}
], - "line_ids": [
- 0
], - "waypoints": [
- {
- "display_name": "string",
- "latitude": 0,
- "longitude": 0,
- "arrival_schedule_at": "string",
- "departure_schedule_at": "string"
}
]
}
], - "external_ids": [
- {
- "id": "string",
- "source": "string",
- "description": "string"
}
], - "items": [
- {
- "status": "string",
- "id": "175938",
- "metadata": { },
- "groups": [
- {
- "id": "B234",
- "name": "Stol"
}, - {
- "id": "B1",
- "name": "Møbel"
}
], - "line_id": 1,
- "quantity": 2,
- "gross_amount": 39800,
- "net_amount": 27840,
- "tax_lines": [
- {
- "amount": 5584,
- "amount_dwh": "5584.0440",
- "exempt": false,
- "included_in_price": true,
- "percentage": 25,
- "tax_basis": 27920,
- "tax_basis_dwh": "27920.22",
- "tax_code": "3",
- "tax_group": "Vmva-høy"
}
], - "description": "Stablestol for utendørsbruk",
- "description_alias": "Staplestol",
- "is_changed": false,
- "eligible_for_discount": true,
- "dimension": {
- "color": "string",
- "size": "string",
- "style": "string",
- "config": "string",
- "variant": "string"
}, - "discount_lines": [
- {
- "amount": 23130,
- "percentage": 10,
- "discount_type": "customer",
- "discount_id": "766da0ef-9283-42bd-b012-0582344ec53c",
- "description": "string",
- "line_id": 1
}
], - "additions": [
- {
- "id": "C1203",
- "description": "Extra Cheese",
- "quantity": 1,
- "gross_amount": 1000,
- "groups": [
- {
- "id": "B234",
- "name": "Stol"
}, - {
- "id": "B1",
- "name": "Møbel"
}
]
}
], - "store": {
- "id": "SL02",
- "organization_number": "123456789MVA",
- "name": "SC Oslo",
- "business_name": "SC Oslo AS",
- "comment": "string"
}, - "external_id": "SL02-94821948",
- "related_item": {
- "line_id": 0,
- "type": "required"
}, - "salesperson_id": "string",
- "salesperson_name": "string",
- "comment": "string",
- "version": 0,
- "reversed_reason": "string",
- "dynamic_payout": {
- "rule_type": "string",
- "rule_id": "string"
}, - "payout": {
- "account_id": "string",
- "rule_type": "order.items.store.id",
- "rule_id": "sc029",
- "rule_version": 1,
- "destinations": [
- {
- "type": "percentage",
- "value": "10",
- "destinations": [
- {
- "type": "flat_amount",
- "value": "500",
- "destination": "account-a",
- "amount": 500
}, - {
- "type": "remaining_amount",
- "destinations": [
- {
- "type": "percentage",
- "value": "5.0",
- "destination": "account-b",
- "amount": 3500
}
]
}
], - "amount": 4000
}, - {
- "type": "flat_amount",
- "value": "500",
- "destination": "account-a",
- "amount": 500
}, - {
- "type": "remaining_amount",
- "destinations": [
- {
- "type": "percentage",
- "value": "5",
- "destination": "account-b",
- "amount": 192
}, - {
- "type": "percentage",
- "value": "95.0",
- "destination": "account-c",
- "amount": 38308
}
]
}
], - "metadata": { }
}
}
], - "version": 0,
- "type": "delivery",
- "order_number": "order123456",
- "currency": "NOK",
- "order_id": "string",
- "time_to_live_expires_at": "string",
- "multiple_authorizations": true,
- "payment_details": {
- "remaining_capture_amount": 27840,
- "remaining_refund_amount": 27840,
- "remaining_cancellation_amount": 27840,
- "amount_due": 27840,
- "remaining_authorization_amount": 27840
}, - "sessions": [
- {
- "id": "bd04c959-d159-49b4-a096-2d84e014a8da",
- "created_at": "2019-08-24T14:15:22Z",
- "created_by": "bd04c959-d159-49b4-a096-2d84e014a8da",
- "amount": 27840,
- "items": [
- null
], - "processed_at": "2019-08-24T14:15:22Z",
- "metadata": { },
- "_links": [
- {
- "href": "string",
- "rel": "draft"
}
]
}
], - "authorizations": [
- {
- "items": [
- {
- "amount": 27840,
- "line_id": 0,
- "payout": {
- "rule_id": "string",
- "rule_type": "string",
- "destinations": [
- {
- "destination": null,
- "amount": null
}
]
}
}
], - "processed_at": "2019-08-24T14:15:22Z",
- "processed_by": "dintero-checkout",
- "payment_details": {
- "psp": "Bambora",
- "payment_id": "string",
- "payment_product": "bambora",
- "payment_product_type": "bambora.creditcard",
- "card": {
- "masked_pan": "4444 **** **** 4448",
- "type": "Credit",
- "brand": "Visa",
- "metadata": { }
}
}, - "metadata": { },
- "id": "bd04c959-d159-49b4-a096-2d84e014a8da",
- "created_at": "2019-08-24T14:15:22Z",
- "created_by": "bd04c959-d159-49b4-a096-2d84e014a8da",
- "amount": 27840,
- "success": true,
- "_links": [
- {
- "href": "string",
- "rel": "draft"
}
], - "authorization_id": "bd04c959-d159-49b4-a096-2d84e014a8da"
}
], - "captures": [
- {
- "items": [
- {
- "amount": 27840,
- "line_id": 0,
- "payout": {
- "rule_id": "string",
- "rule_type": "string",
- "destinations": [
- {
- "destination": null,
- "amount": null
}
]
}
}
], - "processed_at": "2019-08-24T14:15:22Z",
- "processed_by": "dintero-checkout",
- "payment_details": {
- "psp": "Bambora",
- "payment_id": "string",
- "payment_product": "bambora",
- "payment_product_type": "bambora.creditcard",
- "card": {
- "masked_pan": "4444 **** **** 4448",
- "type": "Credit",
- "brand": "Visa",
- "metadata": { }
}
}, - "metadata": { },
- "id": "bd04c959-d159-49b4-a096-2d84e014a8da",
- "created_at": "2019-08-24T14:15:22Z",
- "created_by": "bd04c959-d159-49b4-a096-2d84e014a8da",
- "amount": 27840,
- "success": true,
- "_links": [
- {
- "href": "string",
- "rel": "draft"
}
], - "authorization_id": "bd04c959-d159-49b4-a096-2d84e014a8da"
}
], - "refunds": [
- {
- "items": [
- {
- "amount": 27840,
- "line_id": 0,
- "payout": {
- "rule_id": "string",
- "rule_type": "string",
- "destinations": [
- {
- "destination": null,
- "amount": null
}
]
}
}
], - "processed_at": "2019-08-24T14:15:22Z",
- "processed_by": "dintero-checkout",
- "payment_details": {
- "psp": "Bambora",
- "payment_id": "string",
- "payment_product": "bambora",
- "payment_product_type": "bambora.creditcard",
- "card": {
- "masked_pan": "4444 **** **** 4448",
- "type": "Credit",
- "brand": "Visa",
- "metadata": { }
}
}, - "metadata": { },
- "id": "bd04c959-d159-49b4-a096-2d84e014a8da",
- "created_at": "2019-08-24T14:15:22Z",
- "created_by": "bd04c959-d159-49b4-a096-2d84e014a8da",
- "amount": 27840,
- "success": true,
- "_links": [
- {
- "href": "string",
- "rel": "draft"
}
], - "authorization_id": "bd04c959-d159-49b4-a096-2d84e014a8da"
}
], - "cancellations": [
- {
- "items": [
- {
- "amount": 27840,
- "line_id": 0,
- "payout": {
- "rule_id": "string",
- "rule_type": "string",
- "destinations": [
- {
- "destination": null,
- "amount": null
}
]
}
}
], - "processed_at": "2019-08-24T14:15:22Z",
- "processed_by": "dintero-checkout",
- "payment_details": {
- "psp": "Bambora",
- "payment_id": "string",
- "payment_product": "bambora",
- "payment_product_type": "bambora.creditcard",
- "card": {
- "masked_pan": "4444 **** **** 4448",
- "type": "Credit",
- "brand": "Visa",
- "metadata": { }
}
}, - "metadata": { },
- "id": "bd04c959-d159-49b4-a096-2d84e014a8da",
- "created_at": "2019-08-24T14:15:22Z",
- "created_by": "bd04c959-d159-49b4-a096-2d84e014a8da",
- "amount": 27840,
- "success": true,
- "_links": [
- {
- "href": "string",
- "rel": "draft"
}
], - "authorization_id": "bd04c959-d159-49b4-a096-2d84e014a8da"
}
], - "discounts": [
- {
- "id": "string",
- "refs": [
- {
- "id": "string",
- "amount": 0,
- "statistics": {
- "amount": 0,
- "stamp": 0,
- "usage": 0
}, - "stamp": 0,
- "usages": 0,
- "items": [
- {
- "line_id": 0,
- "amount": 0
}
]
}
]
}
], - "store": {
- "id": "SL02",
- "organization_number": "123456789MVA",
- "name": "SC Oslo",
- "business_name": "SC Oslo AS",
- "comments": [
- "string"
]
}, - "external_links": [
- {
- "text": "Order Receipt",
- "public": true
}
], - "attachments": [
- {
- "id": "string",
- "bus_reservation": {
- "booking_id": "NE 138 47794",
- "line_ids": [
- 0
], - "passengers": [
- {
- "id": "string",
- "title": "string",
- "first_name": "string",
- "last_name": "string"
}
], - "itinerary": [
- {
- "departure_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "departure_at": "2019-08-24T14:15:22Z",
- "arrival_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "arrival_at": "2019-08-24T14:15:22Z",
- "operator": "SAS",
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "activates_at": "2019-08-24T14:15:22Z",
- "passenger_id": [
- "string"
]
}
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}, - "car_reservation": {
- "booking_id": "TV 347794",
- "line_ids": [
- 0
], - "itinerary": [
- {
- "rental_company": "Avis",
- "drivers_id": [
- "string"
], - "pick_up_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "pick_up_at": "2019-08-24T14:15:22Z",
- "drop_off_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "drop_off_at": "2019-08-24T14:15:22Z",
- "class": "string"
}
], - "drivers": [
- "string"
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}, - "ferry_reservation": {
- "booking_id": "NE 138 47794",
- "line_ids": [
- 0
], - "passengers": [
- {
- "id": "string",
- "title": "string",
- "first_name": "string",
- "last_name": "string"
}
], - "itinerary": [
- {
- "departure_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "departure_at": "2019-08-24T14:15:22Z",
- "arrival_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "arrival_at": "2019-08-24T14:15:22Z",
- "operator": "SAS",
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "activates_at": "2019-08-24T14:15:22Z",
- "passenger_id": [
- "string"
]
}
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}, - "metro_reservation": {
- "booking_id": "NE 138 47794",
- "line_ids": [
- 0
], - "passengers": [
- {
- "id": "string",
- "title": "string",
- "first_name": "string",
- "last_name": "string"
}
], - "itinerary": [
- {
- "departure_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "departure_at": "2019-08-24T14:15:22Z",
- "arrival_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "arrival_at": "2019-08-24T14:15:22Z",
- "operator": "SAS",
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "activates_at": "2019-08-24T14:15:22Z",
- "passenger_id": [
- "string"
]
}
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}, - "taxi_reservation": {
- "booking_id": "NE 138 47794",
- "line_ids": [
- 0
], - "passengers": [
- {
- "id": "string",
- "title": "string",
- "first_name": "string",
- "last_name": "string"
}
], - "itinerary": [
- {
- "departure_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "departure_at": "2019-08-24T14:15:22Z",
- "arrival_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "arrival_at": "2019-08-24T14:15:22Z",
- "operator": "SAS",
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "activates_at": "2019-08-24T14:15:22Z",
- "passenger_id": [
- "string"
]
}
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}, - "train_reservation": {
- "booking_id": "NE 138 47794",
- "line_ids": [
- 0
], - "passengers": [
- {
- "id": "string",
- "title": "string",
- "first_name": "string",
- "last_name": "string"
}
], - "itinerary": [
- {
- "departure_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "departure_at": "2019-08-24T14:15:22Z",
- "arrival_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "arrival_at": "2019-08-24T14:15:22Z",
- "operator": "SAS",
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "activates_at": "2019-08-24T14:15:22Z",
- "passenger_id": [
- "string"
]
}
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}, - "tram_reservation": {
- "booking_id": "NE 138 47794",
- "line_ids": [
- 0
], - "passengers": [
- {
- "id": "string",
- "title": "string",
- "first_name": "string",
- "last_name": "string"
}
], - "itinerary": [
- {
- "departure_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "departure_at": "2019-08-24T14:15:22Z",
- "arrival_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "arrival_at": "2019-08-24T14:15:22Z",
- "operator": "SAS",
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "activates_at": "2019-08-24T14:15:22Z",
- "passenger_id": [
- "string"
]
}
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}
}
], - "comments": [
- {
- "id": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "created_by": "string",
- "deleted_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
- "deleted_at": "2019-08-24T14:15:22Z",
- "body": "string",
- "visibility": "private"
}
], - "delivery_id": "string",
- "_links": [
- {
- "href": "string",
- "rel": "draft"
}
]
}
]
}
Get draft order.
scopes:
aid required | string <^[PT]{1}\d{8}$> = 9 characters An id that uniquely identifies the account. |
id required | string <uuid> The resource identifier string |
{- "id": "bd04c959-d159-49b4-a096-2d84e014a8da",
- "created_at": "2019-08-24T14:15:22Z",
- "created_by": "bd04c959-d159-49b4-a096-2d84e014a8da",
- "updated_at": "2019-08-24T14:15:22Z",
- "deleted_by": "bd04c959-d159-49b4-a096-2d84e014a8da",
- "deleted_at": "2019-08-24T14:15:22Z",
- "status": "open",
- "_links": [
- {
- "href": "string",
- "rel": "draft"
}
], - "version": 0,
- "events": [
- {
- "event_type": "api-event",
- "id": "bd04c959-d159-49b4-a096-2d84e014a8da",
- "created_at": "2019-08-24T14:15:22Z",
- "created_by": "bd04c959-d159-49b4-a096-2d84e014a8da",
- "version": 0,
- "request": {
- "path": "string",
- "method": "string",
- "body": "string"
}, - "draft_id": "string"
}
], - "options": {
- "order_time_to_live": 94672800,
- "generate_order_id": "UUID",
- "order_id": "string",
- "replace": "order",
- "payout": {
- "rules": [
- {
- "account_id": "string",
- "rule_type": "order.items.store.id",
- "rule_id": "sc029",
- "rule_version": 1,
- "destinations": [
- {
- "type": "percentage",
- "value": 10,
- "destinations": [
- {
- "type": "flat_amount",
- "value": "500",
- "destination": "account-a"
}, - {
- "type": "remaining_amount",
- "destinations": [
- {
- "type": "percentage",
- "value": "5.0",
- "destination": "account-b"
}
]
}
]
}, - {
- "type": "flat_amount",
- "value": "500",
- "destination": "account-a"
}, - {
- "type": "remaining_amount",
- "destinations": [
- {
- "type": "percentage",
- "value": "5",
- "destination": "account-b"
}, - {
- "type": "percentage",
- "value": "95.0",
- "destination": "account-c"
}
]
}
], - "metadata": { }
}
], - "resolve_rule_id": "order.items.store.id",
- "resolve_rule_type": "string"
}, - "split_draft": false,
- "serial_order_number_suffix": false,
- "multiple_authorizations": false
}, - "order": {
- "customer": {
- "first_name": "John",
- "last_name": "Doe",
- "id": "string",
- "gender": "male",
- "email": "customer@example.com",
- "metadata": {
- "dob_year": 1985
}, - "phone_number": "+4799999999",
- "addresses": [
- {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO",
- "type": "string",
- "custom_type": "string"
}
], - "pays_tax": false,
- "date_of_birth": "1990-09-20",
- "favorite_store": "string",
- "company": {
- "organization_number": "123456789MVA",
- "bussiness_name": "TKP tech AS",
- "department": "sales department",
- "industry": "computer industry",
- "website": "string",
- "number_of_employees": "string"
}, - "marketing_consent": {
- "sms": {
- "consent": true,
- "updated_at": "2018-01-12T13:42:00Z"
}, - "email": {
- "consent": true,
- "updated_at": "2018-01-12T13:42:00Z"
}
}, - "status": "string",
- "term": {
- "id": "string"
}, - "type": "customer"
}, - "gross_amount": 59800,
- "net_amount": 47840,
- "total_discount": 23130,
- "total_manual_discount_amount": 0,
- "shipping_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO",
- "first_name": "John",
- "last_name": "Doe",
- "comment": "5th floor, use doorbell."
}, - "billing_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO",
- "first_name": "John",
- "last_name": "Doe",
- "comment": "5th floor, use doorbell."
}, - "metadata": { },
- "comment": "string",
- "salesperson_id": "string",
- "salesperson_name": "string",
- "delivery_at": "2019-08-24T14:15:22Z",
- "pickup_at": "2019-08-24T14:15:22Z",
- "courier_id": "string",
- "pre_order": true,
- "time_to_live": 94672800,
- "itinerary": [
- {
- "id": "string",
- "operator": "string",
- "arrival_address": {
- "id": "string",
- "name": "string",
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO",
- "external_ids": [
- {
- "id": "string",
- "source": "string",
- "description": "string"
}
]
}, - "arrival_at": "string",
- "departure_address": {
- "id": "string",
- "name": "string",
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO",
- "external_ids": [
- {
- "id": "string",
- "source": "string",
- "description": "string"
}
]
}, - "departure_at": "string",
- "travel_mode": "BUS",
- "route_id": "string",
- "vehicle_id": "string",
- "summary": "string",
- "distance": {
- "value": 0
}, - "duration": {
- "value": 0
}, - "tickets": [
- {
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "passenger_id": [
- "string"
]
}
], - "line_ids": [
- 0
], - "waypoints": [
- {
- "display_name": "string",
- "latitude": 0,
- "longitude": 0,
- "arrival_schedule_at": "string",
- "departure_schedule_at": "string"
}
]
}
], - "external_ids": [
- {
- "id": "string",
- "source": "string",
- "description": "string"
}
], - "items": [
- {
- "status": "string",
- "id": "175938",
- "metadata": { },
- "groups": [
- {
- "id": "B234",
- "name": "Stol"
}, - {
- "id": "B1",
- "name": "Møbel"
}
], - "line_id": 1,
- "quantity": 2,
- "gross_amount": 39800,
- "net_amount": 27840,
- "tax_lines": [
- {
- "amount": 5584,
- "amount_dwh": "5584.0440",
- "exempt": false,
- "included_in_price": true,
- "percentage": 25,
- "tax_basis": 27920,
- "tax_basis_dwh": "27920.22",
- "tax_code": "3",
- "tax_group": "Vmva-høy"
}
], - "description": "Stablestol for utendørsbruk",
- "description_alias": "Staplestol",
- "is_changed": false,
- "eligible_for_discount": true,
- "dimension": {
- "color": "string",
- "size": "string",
- "style": "string",
- "config": "string",
- "variant": "string"
}, - "discount_lines": [
- {
- "amount": 23130,
- "percentage": 10,
- "discount_type": "customer",
- "discount_id": "766da0ef-9283-42bd-b012-0582344ec53c",
- "description": "string",
- "line_id": 1
}
], - "additions": [
- {
- "id": "C1203",
- "description": "Extra Cheese",
- "quantity": 1,
- "gross_amount": 1000,
- "groups": [
- {
- "id": "B234",
- "name": "Stol"
}, - {
- "id": "B1",
- "name": "Møbel"
}
]
}
], - "store": {
- "id": "SL02",
- "organization_number": "123456789MVA",
- "name": "SC Oslo",
- "business_name": "SC Oslo AS",
- "comment": "string"
}, - "external_id": "SL02-94821948",
- "related_item": {
- "line_id": 0,
- "type": "required"
}, - "salesperson_id": "string",
- "salesperson_name": "string",
- "comment": "string",
- "version": 0,
- "reversed_reason": "string",
- "dynamic_payout": {
- "rule_type": "string",
- "rule_id": "string"
}, - "payout": {
- "account_id": "string",
- "rule_type": "order.items.store.id",
- "rule_id": "sc029",
- "rule_version": 1,
- "destinations": [
- {
- "type": "percentage",
- "value": "10",
- "destinations": [
- {
- "type": "flat_amount",
- "value": "500",
- "destination": "account-a",
- "amount": 500
}, - {
- "type": "remaining_amount",
- "destinations": [
- {
- "type": "percentage",
- "value": "5.0",
- "destination": "account-b",
- "amount": 3500
}
]
}
], - "amount": 4000
}, - {
- "type": "flat_amount",
- "value": "500",
- "destination": "account-a",
- "amount": 500
}, - {
- "type": "remaining_amount",
- "destinations": [
- {
- "type": "percentage",
- "value": "5",
- "destination": "account-b",
- "amount": 192
}, - {
- "type": "percentage",
- "value": "95.0",
- "destination": "account-c",
- "amount": 38308
}
]
}
], - "metadata": { }
}
}
], - "version": 0,
- "type": "delivery",
- "order_number": "order123456",
- "currency": "NOK",
- "order_id": "string",
- "time_to_live_expires_at": "string",
- "multiple_authorizations": true,
- "discounts": [
- {
- "id": "string",
- "refs": [
- {
- "id": "string",
- "amount": 0,
- "statistics": {
- "amount": 0,
- "stamp": 0,
- "usage": 0
}, - "stamp": 0,
- "usages": 0,
- "items": [
- {
- "line_id": 0,
- "amount": 0
}
]
}
]
}
], - "store": {
- "id": "SL02",
- "organization_number": "123456789MVA",
- "name": "SC Oslo",
- "business_name": "SC Oslo AS",
- "comments": [
- "string"
]
}, - "external_links": [
- {
- "text": "Order Receipt",
- "public": true
}
], - "attachments": [
- {
- "id": "string",
- "bus_reservation": {
- "booking_id": "NE 138 47794",
- "line_ids": [
- 0
], - "passengers": [
- {
- "id": "string",
- "title": "string",
- "first_name": "string",
- "last_name": "string"
}
], - "itinerary": [
- {
- "departure_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "departure_at": "2019-08-24T14:15:22Z",
- "arrival_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "arrival_at": "2019-08-24T14:15:22Z",
- "operator": "SAS",
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "activates_at": "2019-08-24T14:15:22Z",
- "passenger_id": [
- "string"
]
}
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}, - "car_reservation": {
- "booking_id": "TV 347794",
- "line_ids": [
- 0
], - "itinerary": [
- {
- "rental_company": "Avis",
- "drivers_id": [
- "string"
], - "pick_up_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "pick_up_at": "2019-08-24T14:15:22Z",
- "drop_off_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "drop_off_at": "2019-08-24T14:15:22Z",
- "class": "string"
}
], - "drivers": [
- "string"
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}, - "ferry_reservation": {
- "booking_id": "NE 138 47794",
- "line_ids": [
- 0
], - "passengers": [
- {
- "id": "string",
- "title": "string",
- "first_name": "string",
- "last_name": "string"
}
], - "itinerary": [
- {
- "departure_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "departure_at": "2019-08-24T14:15:22Z",
- "arrival_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "arrival_at": "2019-08-24T14:15:22Z",
- "operator": "SAS",
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "activates_at": "2019-08-24T14:15:22Z",
- "passenger_id": [
- "string"
]
}
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}, - "metro_reservation": {
- "booking_id": "NE 138 47794",
- "line_ids": [
- 0
], - "passengers": [
- {
- "id": "string",
- "title": "string",
- "first_name": "string",
- "last_name": "string"
}
], - "itinerary": [
- {
- "departure_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "departure_at": "2019-08-24T14:15:22Z",
- "arrival_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "arrival_at": "2019-08-24T14:15:22Z",
- "operator": "SAS",
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "activates_at": "2019-08-24T14:15:22Z",
- "passenger_id": [
- "string"
]
}
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}, - "taxi_reservation": {
- "booking_id": "NE 138 47794",
- "line_ids": [
- 0
], - "passengers": [
- {
- "id": "string",
- "title": "string",
- "first_name": "string",
- "last_name": "string"
}
], - "itinerary": [
- {
- "departure_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "departure_at": "2019-08-24T14:15:22Z",
- "arrival_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "arrival_at": "2019-08-24T14:15:22Z",
- "operator": "SAS",
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "activates_at": "2019-08-24T14:15:22Z",
- "passenger_id": [
- "string"
]
}
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}, - "train_reservation": {
- "booking_id": "NE 138 47794",
- "line_ids": [
- 0
], - "passengers": [
- {
- "id": "string",
- "title": "string",
- "first_name": "string",
- "last_name": "string"
}
], - "itinerary": [
- {
- "departure_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "departure_at": "2019-08-24T14:15:22Z",
- "arrival_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "arrival_at": "2019-08-24T14:15:22Z",
- "operator": "SAS",
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "activates_at": "2019-08-24T14:15:22Z",
- "passenger_id": [
- "string"
]
}
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}, - "tram_reservation": {
- "booking_id": "NE 138 47794",
- "line_ids": [
- 0
], - "passengers": [
- {
- "id": "string",
- "title": "string",
- "first_name": "string",
- "last_name": "string"
}
], - "itinerary": [
- {
- "departure_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "departure_at": "2019-08-24T14:15:22Z",
- "arrival_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "arrival_at": "2019-08-24T14:15:22Z",
- "operator": "SAS",
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "activates_at": "2019-08-24T14:15:22Z",
- "passenger_id": [
- "string"
]
}
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}
}
], - "stores": [
- {
- "id": "SL02",
- "organization_number": "123456789MVA",
- "name": "SC Oslo",
- "business_name": "SC Oslo AS",
- "comments": [
- "string"
]
}
]
}
}
Updates a draft order.
scopes:
aid required | string <^[PT]{1}\d{8}$> = 9 characters An id that uniquely identifies the account. |
id required | string <uuid> The resource identifier string |
apply_discounts | boolean Default: false Calculate available discounts and apply them to the order. Requires additional scope for accessing the DealEngine, one of
The
|
draft order resource
required | object (OrderObject) |
object |
{- "options": {
- "order_time_to_live": 94672800,
- "generate_order_id": "UUID",
- "order_id": "string",
- "replace": "order",
- "payout": {
- "rules": [
- {
- "rule_type": "order.items.store.id",
- "rule_id": "sc029",
- "destinations": [
- {
- "type": "percentage",
- "value": 10,
- "destinations": [
- {
- "type": "flat_amount",
- "value": "500",
- "destination": "account-a"
}, - {
- "type": "remaining_amount",
- "destinations": [
- {
- "type": "percentage",
- "value": "5.0",
- "destination": "account-b"
}
]
}
]
}, - {
- "type": "flat_amount",
- "value": "500",
- "destination": "account-a"
}, - {
- "type": "remaining_amount",
- "destinations": [
- {
- "type": "percentage",
- "value": "5",
- "destination": "account-b"
}, - {
- "type": "percentage",
- "value": "95.0",
- "destination": "account-c"
}
]
}
], - "metadata": { }
}
], - "resolve_rule_id": "order.items.store.id",
- "resolve_rule_type": "string"
}, - "split_draft": false,
- "serial_order_number_suffix": false,
- "multiple_authorizations": false
}, - "order": {
- "customer": {
- "first_name": "John",
- "last_name": "Doe",
- "id": "string",
- "gender": "male",
- "email": "customer@example.com",
- "metadata": {
- "dob_year": 1985
}, - "phone_number": "+4799999999",
- "addresses": [
- {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO",
- "type": "string",
- "custom_type": "string"
}
], - "pays_tax": false,
- "date_of_birth": "1990-09-20",
- "favorite_store": "string",
- "company": {
- "organization_number": "123456789MVA",
- "bussiness_name": "TKP tech AS",
- "department": "sales department",
- "industry": "computer industry",
- "website": "string",
- "number_of_employees": "string"
}, - "marketing_consent": {
- "sms": {
- "consent": true
}, - "email": {
- "consent": true
}
}, - "status": "string",
- "term": {
- "id": "string"
}, - "type": "customer"
}, - "shipping_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO",
- "first_name": "John",
- "last_name": "Doe",
- "comment": "5th floor, use doorbell."
}, - "billing_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO",
- "first_name": "John",
- "last_name": "Doe",
- "comment": "5th floor, use doorbell."
}, - "metadata": { },
- "comment": "string",
- "salesperson_id": "string",
- "salesperson_name": "string",
- "delivery_at": "2019-08-24T14:15:22Z",
- "pickup_at": "2019-08-24T14:15:22Z",
- "courier_id": "string",
- "pre_order": true,
- "time_to_live": 94672800,
- "itinerary": [
- {
- "id": "string",
- "operator": "string",
- "arrival_address": {
- "id": "string",
- "name": "string",
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO",
- "external_ids": [
- {
- "id": "string",
- "source": "string",
- "description": "string"
}
]
}, - "arrival_at": "string",
- "departure_address": {
- "id": "string",
- "name": "string",
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO",
- "external_ids": [
- {
- "id": "string",
- "source": "string",
- "description": "string"
}
]
}, - "departure_at": "string",
- "travel_mode": "BUS",
- "route_id": "string",
- "vehicle_id": "string",
- "summary": "string",
- "distance": {
- "value": 0
}, - "duration": {
- "value": 0
}, - "tickets": [
- {
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "passenger_id": [
- "string"
]
}
], - "line_ids": [
- 0
], - "waypoints": [
- {
- "display_name": "string",
- "latitude": 0,
- "longitude": 0,
- "arrival_schedule_at": "string",
- "departure_schedule_at": "string"
}
]
}
], - "external_ids": [
- {
- "id": "string",
- "source": "string",
- "description": "string"
}
], - "items": [
- {
- "status": "string",
- "id": "175938",
- "metadata": { },
- "groups": [
- {
- "id": "B234",
- "name": "Stol"
}, - {
- "id": "B1",
- "name": "Møbel"
}
], - "line_id": 1,
- "quantity": 2,
- "gross_amount": 39800,
- "tax_lines": [
- {
- "amount": 5584,
- "amount_dwh": "5584.0440",
- "exempt": false,
- "included_in_price": true,
- "percentage": 25,
- "tax_basis": 27920,
- "tax_basis_dwh": "27920.22",
- "tax_code": "3",
- "tax_group": "Vmva-høy"
}
], - "description": "Stablestol for utendørsbruk",
- "description_alias": "Staplestol",
- "eligible_for_discount": true,
- "dimension": {
- "color": "string",
- "size": "string",
- "style": "string",
- "config": "string",
- "variant": "string"
}, - "discount_lines": [
- {
- "amount": 23130,
- "percentage": 10,
- "discount_type": "customer",
- "discount_id": "766da0ef-9283-42bd-b012-0582344ec53c",
- "description": "string",
- "line_id": 1
}
], - "additions": [
- {
- "id": "C1203",
- "description": "Extra Cheese",
- "quantity": 1,
- "gross_amount": 1000,
- "groups": [
- {
- "id": "B234",
- "name": "Stol"
}, - {
- "id": "B1",
- "name": "Møbel"
}
]
}
], - "store": {
- "id": "SL02",
- "organization_number": "123456789MVA",
- "name": "SC Oslo",
- "business_name": "SC Oslo AS",
- "comment": "string"
}, - "external_id": "SL02-94821948",
- "related_item": {
- "line_id": 0,
- "type": "required"
}, - "salesperson_id": "string",
- "salesperson_name": "string",
- "comment": "string",
- "reversed_reason": "string",
- "dynamic_payout": {
- "rule_type": "string",
- "rule_id": "string"
}
}
], - "type": "delivery",
- "order_number": "order123456",
- "currency": "NOK",
- "order_id": "string",
- "time_to_live_expires_at": "string",
- "multiple_authorizations": true,
- "store": {
- "id": "SL02",
- "organization_number": "123456789MVA",
- "name": "SC Oslo",
- "business_name": "SC Oslo AS",
- "comments": [
- "string"
]
}, - "external_links": [
- {
- "text": "Order Receipt",
- "public": true
}
], - "attachments": [
- {
- "id": "string",
- "bus_reservation": {
- "booking_id": "NE 138 47794",
- "line_ids": [
- 0
], - "passengers": [
- {
- "id": "string",
- "title": "string",
- "first_name": "string",
- "last_name": "string"
}
], - "itinerary": [
- {
- "departure_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "departure_at": "2019-08-24T14:15:22Z",
- "arrival_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "arrival_at": "2019-08-24T14:15:22Z",
- "operator": "SAS",
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "activates_at": "2019-08-24T14:15:22Z",
- "passenger_id": [
- "string"
]
}
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}, - "car_reservation": {
- "booking_id": "TV 347794",
- "line_ids": [
- 0
], - "itinerary": [
- {
- "rental_company": "Avis",
- "drivers_id": [
- "string"
], - "pick_up_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "pick_up_at": "2019-08-24T14:15:22Z",
- "drop_off_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "drop_off_at": "2019-08-24T14:15:22Z",
- "class": "string"
}
], - "drivers": [
- "string"
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}, - "ferry_reservation": {
- "booking_id": "NE 138 47794",
- "line_ids": [
- 0
], - "passengers": [
- {
- "id": "string",
- "title": "string",
- "first_name": "string",
- "last_name": "string"
}
], - "itinerary": [
- {
- "departure_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "departure_at": "2019-08-24T14:15:22Z",
- "arrival_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "arrival_at": "2019-08-24T14:15:22Z",
- "operator": "SAS",
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "activates_at": "2019-08-24T14:15:22Z",
- "passenger_id": [
- "string"
]
}
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}, - "metro_reservation": {
- "booking_id": "NE 138 47794",
- "line_ids": [
- 0
], - "passengers": [
- {
- "id": "string",
- "title": "string",
- "first_name": "string",
- "last_name": "string"
}
], - "itinerary": [
- {
- "departure_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "departure_at": "2019-08-24T14:15:22Z",
- "arrival_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "arrival_at": "2019-08-24T14:15:22Z",
- "operator": "SAS",
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "activates_at": "2019-08-24T14:15:22Z",
- "passenger_id": [
- "string"
]
}
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}, - "taxi_reservation": {
- "booking_id": "NE 138 47794",
- "line_ids": [
- 0
], - "passengers": [
- {
- "id": "string",
- "title": "string",
- "first_name": "string",
- "last_name": "string"
}
], - "itinerary": [
- {
- "departure_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "departure_at": "2019-08-24T14:15:22Z",
- "arrival_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "arrival_at": "2019-08-24T14:15:22Z",
- "operator": "SAS",
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "activates_at": "2019-08-24T14:15:22Z",
- "passenger_id": [
- "string"
]
}
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}, - "train_reservation": {
- "booking_id": "NE 138 47794",
- "line_ids": [
- 0
], - "passengers": [
- {
- "id": "string",
- "title": "string",
- "first_name": "string",
- "last_name": "string"
}
], - "itinerary": [
- {
- "departure_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "departure_at": "2019-08-24T14:15:22Z",
- "arrival_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "arrival_at": "2019-08-24T14:15:22Z",
- "operator": "SAS",
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "activates_at": "2019-08-24T14:15:22Z",
- "passenger_id": [
- "string"
]
}
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}, - "tram_reservation": {
- "booking_id": "NE 138 47794",
- "line_ids": [
- 0
], - "passengers": [
- {
- "id": "string",
- "title": "string",
- "first_name": "string",
- "last_name": "string"
}
], - "itinerary": [
- {
- "departure_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "departure_at": "2019-08-24T14:15:22Z",
- "arrival_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "arrival_at": "2019-08-24T14:15:22Z",
- "operator": "SAS",
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "activates_at": "2019-08-24T14:15:22Z",
- "passenger_id": [
- "string"
]
}
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}
}
]
}
}
{- "id": "bd04c959-d159-49b4-a096-2d84e014a8da",
- "created_at": "2019-08-24T14:15:22Z",
- "created_by": "bd04c959-d159-49b4-a096-2d84e014a8da",
- "updated_at": "2019-08-24T14:15:22Z",
- "deleted_by": "bd04c959-d159-49b4-a096-2d84e014a8da",
- "deleted_at": "2019-08-24T14:15:22Z",
- "status": "open",
- "_links": [
- {
- "href": "string",
- "rel": "draft"
}
], - "version": 0,
- "events": [
- {
- "event_type": "api-event",
- "id": "bd04c959-d159-49b4-a096-2d84e014a8da",
- "created_at": "2019-08-24T14:15:22Z",
- "created_by": "bd04c959-d159-49b4-a096-2d84e014a8da",
- "version": 0,
- "request": {
- "path": "string",
- "method": "string",
- "body": "string"
}, - "draft_id": "string"
}
], - "options": {
- "order_time_to_live": 94672800,
- "generate_order_id": "UUID",
- "order_id": "string",
- "replace": "order",
- "payout": {
- "rules": [
- {
- "account_id": "string",
- "rule_type": "order.items.store.id",
- "rule_id": "sc029",
- "rule_version": 1,
- "destinations": [
- {
- "type": "percentage",
- "value": 10,
- "destinations": [
- {
- "type": "flat_amount",
- "value": "500",
- "destination": "account-a"
}, - {
- "type": "remaining_amount",
- "destinations": [
- {
- "type": "percentage",
- "value": "5.0",
- "destination": "account-b"
}
]
}
]
}, - {
- "type": "flat_amount",
- "value": "500",
- "destination": "account-a"
}, - {
- "type": "remaining_amount",
- "destinations": [
- {
- "type": "percentage",
- "value": "5",
- "destination": "account-b"
}, - {
- "type": "percentage",
- "value": "95.0",
- "destination": "account-c"
}
]
}
], - "metadata": { }
}
], - "resolve_rule_id": "order.items.store.id",
- "resolve_rule_type": "string"
}, - "split_draft": false,
- "serial_order_number_suffix": false,
- "multiple_authorizations": false
}, - "order": {
- "customer": {
- "first_name": "John",
- "last_name": "Doe",
- "id": "string",
- "gender": "male",
- "email": "customer@example.com",
- "metadata": {
- "dob_year": 1985
}, - "phone_number": "+4799999999",
- "addresses": [
- {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO",
- "type": "string",
- "custom_type": "string"
}
], - "pays_tax": false,
- "date_of_birth": "1990-09-20",
- "favorite_store": "string",
- "company": {
- "organization_number": "123456789MVA",
- "bussiness_name": "TKP tech AS",
- "department": "sales department",
- "industry": "computer industry",
- "website": "string",
- "number_of_employees": "string"
}, - "marketing_consent": {
- "sms": {
- "consent": true,
- "updated_at": "2018-01-12T13:42:00Z"
}, - "email": {
- "consent": true,
- "updated_at": "2018-01-12T13:42:00Z"
}
}, - "status": "string",
- "term": {
- "id": "string"
}, - "type": "customer"
}, - "gross_amount": 59800,
- "net_amount": 47840,
- "total_discount": 23130,
- "total_manual_discount_amount": 0,
- "shipping_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO",
- "first_name": "John",
- "last_name": "Doe",
- "comment": "5th floor, use doorbell."
}, - "billing_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO",
- "first_name": "John",
- "last_name": "Doe",
- "comment": "5th floor, use doorbell."
}, - "metadata": { },
- "comment": "string",
- "salesperson_id": "string",
- "salesperson_name": "string",
- "delivery_at": "2019-08-24T14:15:22Z",
- "pickup_at": "2019-08-24T14:15:22Z",
- "courier_id": "string",
- "pre_order": true,
- "time_to_live": 94672800,
- "itinerary": [
- {
- "id": "string",
- "operator": "string",
- "arrival_address": {
- "id": "string",
- "name": "string",
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO",
- "external_ids": [
- {
- "id": "string",
- "source": "string",
- "description": "string"
}
]
}, - "arrival_at": "string",
- "departure_address": {
- "id": "string",
- "name": "string",
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO",
- "external_ids": [
- {
- "id": "string",
- "source": "string",
- "description": "string"
}
]
}, - "departure_at": "string",
- "travel_mode": "BUS",
- "route_id": "string",
- "vehicle_id": "string",
- "summary": "string",
- "distance": {
- "value": 0
}, - "duration": {
- "value": 0
}, - "tickets": [
- {
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "passenger_id": [
- "string"
]
}
], - "line_ids": [
- 0
], - "waypoints": [
- {
- "display_name": "string",
- "latitude": 0,
- "longitude": 0,
- "arrival_schedule_at": "string",
- "departure_schedule_at": "string"
}
]
}
], - "external_ids": [
- {
- "id": "string",
- "source": "string",
- "description": "string"
}
], - "items": [
- {
- "status": "string",
- "id": "175938",
- "metadata": { },
- "groups": [
- {
- "id": "B234",
- "name": "Stol"
}, - {
- "id": "B1",
- "name": "Møbel"
}
], - "line_id": 1,
- "quantity": 2,
- "gross_amount": 39800,
- "net_amount": 27840,
- "tax_lines": [
- {
- "amount": 5584,
- "amount_dwh": "5584.0440",
- "exempt": false,
- "included_in_price": true,
- "percentage": 25,
- "tax_basis": 27920,
- "tax_basis_dwh": "27920.22",
- "tax_code": "3",
- "tax_group": "Vmva-høy"
}
], - "description": "Stablestol for utendørsbruk",
- "description_alias": "Staplestol",
- "is_changed": false,
- "eligible_for_discount": true,
- "dimension": {
- "color": "string",
- "size": "string",
- "style": "string",
- "config": "string",
- "variant": "string"
}, - "discount_lines": [
- {
- "amount": 23130,
- "percentage": 10,
- "discount_type": "customer",
- "discount_id": "766da0ef-9283-42bd-b012-0582344ec53c",
- "description": "string",
- "line_id": 1
}
], - "additions": [
- {
- "id": "C1203",
- "description": "Extra Cheese",
- "quantity": 1,
- "gross_amount": 1000,
- "groups": [
- {
- "id": "B234",
- "name": "Stol"
}, - {
- "id": "B1",
- "name": "Møbel"
}
]
}
], - "store": {
- "id": "SL02",
- "organization_number": "123456789MVA",
- "name": "SC Oslo",
- "business_name": "SC Oslo AS",
- "comment": "string"
}, - "external_id": "SL02-94821948",
- "related_item": {
- "line_id": 0,
- "type": "required"
}, - "salesperson_id": "string",
- "salesperson_name": "string",
- "comment": "string",
- "version": 0,
- "reversed_reason": "string",
- "dynamic_payout": {
- "rule_type": "string",
- "rule_id": "string"
}, - "payout": {
- "account_id": "string",
- "rule_type": "order.items.store.id",
- "rule_id": "sc029",
- "rule_version": 1,
- "destinations": [
- {
- "type": "percentage",
- "value": "10",
- "destinations": [
- {
- "type": "flat_amount",
- "value": "500",
- "destination": "account-a",
- "amount": 500
}, - {
- "type": "remaining_amount",
- "destinations": [
- {
- "type": "percentage",
- "value": "5.0",
- "destination": "account-b",
- "amount": 3500
}
]
}
], - "amount": 4000
}, - {
- "type": "flat_amount",
- "value": "500",
- "destination": "account-a",
- "amount": 500
}, - {
- "type": "remaining_amount",
- "destinations": [
- {
- "type": "percentage",
- "value": "5",
- "destination": "account-b",
- "amount": 192
}, - {
- "type": "percentage",
- "value": "95.0",
- "destination": "account-c",
- "amount": 38308
}
]
}
], - "metadata": { }
}
}
], - "version": 0,
- "type": "delivery",
- "order_number": "order123456",
- "currency": "NOK",
- "order_id": "string",
- "time_to_live_expires_at": "string",
- "multiple_authorizations": true,
- "discounts": [
- {
- "id": "string",
- "refs": [
- {
- "id": "string",
- "amount": 0,
- "statistics": {
- "amount": 0,
- "stamp": 0,
- "usage": 0
}, - "stamp": 0,
- "usages": 0,
- "items": [
- {
- "line_id": 0,
- "amount": 0
}
]
}
]
}
], - "store": {
- "id": "SL02",
- "organization_number": "123456789MVA",
- "name": "SC Oslo",
- "business_name": "SC Oslo AS",
- "comments": [
- "string"
]
}, - "external_links": [
- {
- "text": "Order Receipt",
- "public": true
}
], - "attachments": [
- {
- "id": "string",
- "bus_reservation": {
- "booking_id": "NE 138 47794",
- "line_ids": [
- 0
], - "passengers": [
- {
- "id": "string",
- "title": "string",
- "first_name": "string",
- "last_name": "string"
}
], - "itinerary": [
- {
- "departure_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "departure_at": "2019-08-24T14:15:22Z",
- "arrival_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "arrival_at": "2019-08-24T14:15:22Z",
- "operator": "SAS",
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "activates_at": "2019-08-24T14:15:22Z",
- "passenger_id": [
- "string"
]
}
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}, - "car_reservation": {
- "booking_id": "TV 347794",
- "line_ids": [
- 0
], - "itinerary": [
- {
- "rental_company": "Avis",
- "drivers_id": [
- "string"
], - "pick_up_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "pick_up_at": "2019-08-24T14:15:22Z",
- "drop_off_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "drop_off_at": "2019-08-24T14:15:22Z",
- "class": "string"
}
], - "drivers": [
- "string"
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}, - "ferry_reservation": {
- "booking_id": "NE 138 47794",
- "line_ids": [
- 0
], - "passengers": [
- {
- "id": "string",
- "title": "string",
- "first_name": "string",
- "last_name": "string"
}
], - "itinerary": [
- {
- "departure_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "departure_at": "2019-08-24T14:15:22Z",
- "arrival_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "arrival_at": "2019-08-24T14:15:22Z",
- "operator": "SAS",
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "activates_at": "2019-08-24T14:15:22Z",
- "passenger_id": [
- "string"
]
}
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}, - "metro_reservation": {
- "booking_id": "NE 138 47794",
- "line_ids": [
- 0
], - "passengers": [
- {
- "id": "string",
- "title": "string",
- "first_name": "string",
- "last_name": "string"
}
], - "itinerary": [
- {
- "departure_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "departure_at": "2019-08-24T14:15:22Z",
- "arrival_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "arrival_at": "2019-08-24T14:15:22Z",
- "operator": "SAS",
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "activates_at": "2019-08-24T14:15:22Z",
- "passenger_id": [
- "string"
]
}
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}, - "taxi_reservation": {
- "booking_id": "NE 138 47794",
- "line_ids": [
- 0
], - "passengers": [
- {
- "id": "string",
- "title": "string",
- "first_name": "string",
- "last_name": "string"
}
], - "itinerary": [
- {
- "departure_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "departure_at": "2019-08-24T14:15:22Z",
- "arrival_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "arrival_at": "2019-08-24T14:15:22Z",
- "operator": "SAS",
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "activates_at": "2019-08-24T14:15:22Z",
- "passenger_id": [
- "string"
]
}
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}, - "train_reservation": {
- "booking_id": "NE 138 47794",
- "line_ids": [
- 0
], - "passengers": [
- {
- "id": "string",
- "title": "string",
- "first_name": "string",
- "last_name": "string"
}
], - "itinerary": [
- {
- "departure_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "departure_at": "2019-08-24T14:15:22Z",
- "arrival_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "arrival_at": "2019-08-24T14:15:22Z",
- "operator": "SAS",
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "activates_at": "2019-08-24T14:15:22Z",
- "passenger_id": [
- "string"
]
}
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}, - "tram_reservation": {
- "booking_id": "NE 138 47794",
- "line_ids": [
- 0
], - "passengers": [
- {
- "id": "string",
- "title": "string",
- "first_name": "string",
- "last_name": "string"
}
], - "itinerary": [
- {
- "departure_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "departure_at": "2019-08-24T14:15:22Z",
- "arrival_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "arrival_at": "2019-08-24T14:15:22Z",
- "operator": "SAS",
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "activates_at": "2019-08-24T14:15:22Z",
- "passenger_id": [
- "string"
]
}
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}
}
], - "stores": [
- {
- "id": "SL02",
- "organization_number": "123456789MVA",
- "name": "SC Oslo",
- "business_name": "SC Oslo AS",
- "comments": [
- "string"
]
}
]
}
}
Use this resource to create orders in draft state.
scopes:
aid required | string <^[PT]{1}\d{8}$> = 9 characters An id that uniquely identifies the account. |
apply_discounts | boolean Default: false Calculate available discounts and apply them to the order. Requires additional scope for accessing the DealEngine, one of
The
|
draft order resource
required | object (OrderObject) |
object |
{- "options": {
- "order_time_to_live": 94672800,
- "generate_order_id": "UUID",
- "order_id": "string",
- "replace": "order",
- "payout": {
- "rules": [
- {
- "rule_type": "order.items.store.id",
- "rule_id": "sc029",
- "destinations": [
- {
- "type": "percentage",
- "value": 10,
- "destinations": [
- {
- "type": "flat_amount",
- "value": "500",
- "destination": "account-a"
}, - {
- "type": "remaining_amount",
- "destinations": [
- {
- "type": "percentage",
- "value": "5.0",
- "destination": "account-b"
}
]
}
]
}, - {
- "type": "flat_amount",
- "value": "500",
- "destination": "account-a"
}, - {
- "type": "remaining_amount",
- "destinations": [
- {
- "type": "percentage",
- "value": "5",
- "destination": "account-b"
}, - {
- "type": "percentage",
- "value": "95.0",
- "destination": "account-c"
}
]
}
], - "metadata": { }
}
], - "resolve_rule_id": "order.items.store.id",
- "resolve_rule_type": "string"
}, - "split_draft": false,
- "serial_order_number_suffix": false,
- "multiple_authorizations": false
}, - "order": {
- "customer": {
- "first_name": "John",
- "last_name": "Doe",
- "id": "string",
- "gender": "male",
- "email": "customer@example.com",
- "metadata": {
- "dob_year": 1985
}, - "phone_number": "+4799999999",
- "addresses": [
- {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO",
- "type": "string",
- "custom_type": "string"
}
], - "pays_tax": false,
- "date_of_birth": "1990-09-20",
- "favorite_store": "string",
- "company": {
- "organization_number": "123456789MVA",
- "bussiness_name": "TKP tech AS",
- "department": "sales department",
- "industry": "computer industry",
- "website": "string",
- "number_of_employees": "string"
}, - "marketing_consent": {
- "sms": {
- "consent": true
}, - "email": {
- "consent": true
}
}, - "status": "string",
- "term": {
- "id": "string"
}, - "type": "customer"
}, - "shipping_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO",
- "first_name": "John",
- "last_name": "Doe",
- "comment": "5th floor, use doorbell."
}, - "billing_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO",
- "first_name": "John",
- "last_name": "Doe",
- "comment": "5th floor, use doorbell."
}, - "metadata": { },
- "comment": "string",
- "salesperson_id": "string",
- "salesperson_name": "string",
- "delivery_at": "2019-08-24T14:15:22Z",
- "pickup_at": "2019-08-24T14:15:22Z",
- "courier_id": "string",
- "pre_order": true,
- "time_to_live": 94672800,
- "itinerary": [
- {
- "id": "string",
- "operator": "string",
- "arrival_address": {
- "id": "string",
- "name": "string",
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO",
- "external_ids": [
- {
- "id": "string",
- "source": "string",
- "description": "string"
}
]
}, - "arrival_at": "string",
- "departure_address": {
- "id": "string",
- "name": "string",
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO",
- "external_ids": [
- {
- "id": "string",
- "source": "string",
- "description": "string"
}
]
}, - "departure_at": "string",
- "travel_mode": "BUS",
- "route_id": "string",
- "vehicle_id": "string",
- "summary": "string",
- "distance": {
- "value": 0
}, - "duration": {
- "value": 0
}, - "tickets": [
- {
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "passenger_id": [
- "string"
]
}
], - "line_ids": [
- 0
], - "waypoints": [
- {
- "display_name": "string",
- "latitude": 0,
- "longitude": 0,
- "arrival_schedule_at": "string",
- "departure_schedule_at": "string"
}
]
}
], - "external_ids": [
- {
- "id": "string",
- "source": "string",
- "description": "string"
}
], - "items": [
- {
- "status": "string",
- "id": "175938",
- "metadata": { },
- "groups": [
- {
- "id": "B234",
- "name": "Stol"
}, - {
- "id": "B1",
- "name": "Møbel"
}
], - "line_id": 1,
- "quantity": 2,
- "gross_amount": 39800,
- "tax_lines": [
- {
- "amount": 5584,
- "amount_dwh": "5584.0440",
- "exempt": false,
- "included_in_price": true,
- "percentage": 25,
- "tax_basis": 27920,
- "tax_basis_dwh": "27920.22",
- "tax_code": "3",
- "tax_group": "Vmva-høy"
}
], - "description": "Stablestol for utendørsbruk",
- "description_alias": "Staplestol",
- "eligible_for_discount": true,
- "dimension": {
- "color": "string",
- "size": "string",
- "style": "string",
- "config": "string",
- "variant": "string"
}, - "discount_lines": [
- {
- "amount": 23130,
- "percentage": 10,
- "discount_type": "customer",
- "discount_id": "766da0ef-9283-42bd-b012-0582344ec53c",
- "description": "string",
- "line_id": 1
}
], - "additions": [
- {
- "id": "C1203",
- "description": "Extra Cheese",
- "quantity": 1,
- "gross_amount": 1000,
- "groups": [
- {
- "id": "B234",
- "name": "Stol"
}, - {
- "id": "B1",
- "name": "Møbel"
}
]
}
], - "store": {
- "id": "SL02",
- "organization_number": "123456789MVA",
- "name": "SC Oslo",
- "business_name": "SC Oslo AS",
- "comment": "string"
}, - "external_id": "SL02-94821948",
- "related_item": {
- "line_id": 0,
- "type": "required"
}, - "salesperson_id": "string",
- "salesperson_name": "string",
- "comment": "string",
- "reversed_reason": "string",
- "dynamic_payout": {
- "rule_type": "string",
- "rule_id": "string"
}
}
], - "type": "delivery",
- "order_number": "order123456",
- "currency": "NOK",
- "order_id": "string",
- "time_to_live_expires_at": "string",
- "multiple_authorizations": true,
- "store": {
- "id": "SL02",
- "organization_number": "123456789MVA",
- "name": "SC Oslo",
- "business_name": "SC Oslo AS",
- "comments": [
- "string"
]
}, - "external_links": [
- {
- "text": "Order Receipt",
- "public": true
}
], - "attachments": [
- {
- "id": "string",
- "bus_reservation": {
- "booking_id": "NE 138 47794",
- "line_ids": [
- 0
], - "passengers": [
- {
- "id": "string",
- "title": "string",
- "first_name": "string",
- "last_name": "string"
}
], - "itinerary": [
- {
- "departure_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "departure_at": "2019-08-24T14:15:22Z",
- "arrival_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "arrival_at": "2019-08-24T14:15:22Z",
- "operator": "SAS",
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "activates_at": "2019-08-24T14:15:22Z",
- "passenger_id": [
- "string"
]
}
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}, - "car_reservation": {
- "booking_id": "TV 347794",
- "line_ids": [
- 0
], - "itinerary": [
- {
- "rental_company": "Avis",
- "drivers_id": [
- "string"
], - "pick_up_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "pick_up_at": "2019-08-24T14:15:22Z",
- "drop_off_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "drop_off_at": "2019-08-24T14:15:22Z",
- "class": "string"
}
], - "drivers": [
- "string"
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}, - "ferry_reservation": {
- "booking_id": "NE 138 47794",
- "line_ids": [
- 0
], - "passengers": [
- {
- "id": "string",
- "title": "string",
- "first_name": "string",
- "last_name": "string"
}
], - "itinerary": [
- {
- "departure_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "departure_at": "2019-08-24T14:15:22Z",
- "arrival_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "arrival_at": "2019-08-24T14:15:22Z",
- "operator": "SAS",
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "activates_at": "2019-08-24T14:15:22Z",
- "passenger_id": [
- "string"
]
}
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}, - "metro_reservation": {
- "booking_id": "NE 138 47794",
- "line_ids": [
- 0
], - "passengers": [
- {
- "id": "string",
- "title": "string",
- "first_name": "string",
- "last_name": "string"
}
], - "itinerary": [
- {
- "departure_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "departure_at": "2019-08-24T14:15:22Z",
- "arrival_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "arrival_at": "2019-08-24T14:15:22Z",
- "operator": "SAS",
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "activates_at": "2019-08-24T14:15:22Z",
- "passenger_id": [
- "string"
]
}
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}, - "taxi_reservation": {
- "booking_id": "NE 138 47794",
- "line_ids": [
- 0
], - "passengers": [
- {
- "id": "string",
- "title": "string",
- "first_name": "string",
- "last_name": "string"
}
], - "itinerary": [
- {
- "departure_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "departure_at": "2019-08-24T14:15:22Z",
- "arrival_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "arrival_at": "2019-08-24T14:15:22Z",
- "operator": "SAS",
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "activates_at": "2019-08-24T14:15:22Z",
- "passenger_id": [
- "string"
]
}
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}, - "train_reservation": {
- "booking_id": "NE 138 47794",
- "line_ids": [
- 0
], - "passengers": [
- {
- "id": "string",
- "title": "string",
- "first_name": "string",
- "last_name": "string"
}
], - "itinerary": [
- {
- "departure_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "departure_at": "2019-08-24T14:15:22Z",
- "arrival_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "arrival_at": "2019-08-24T14:15:22Z",
- "operator": "SAS",
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "activates_at": "2019-08-24T14:15:22Z",
- "passenger_id": [
- "string"
]
}
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}, - "tram_reservation": {
- "booking_id": "NE 138 47794",
- "line_ids": [
- 0
], - "passengers": [
- {
- "id": "string",
- "title": "string",
- "first_name": "string",
- "last_name": "string"
}
], - "itinerary": [
- {
- "departure_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "departure_at": "2019-08-24T14:15:22Z",
- "arrival_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "arrival_at": "2019-08-24T14:15:22Z",
- "operator": "SAS",
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "activates_at": "2019-08-24T14:15:22Z",
- "passenger_id": [
- "string"
]
}
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}
}
]
}
}
{- "id": "bd04c959-d159-49b4-a096-2d84e014a8da",
- "created_at": "2019-08-24T14:15:22Z",
- "created_by": "bd04c959-d159-49b4-a096-2d84e014a8da",
- "updated_at": "2019-08-24T14:15:22Z",
- "deleted_by": "bd04c959-d159-49b4-a096-2d84e014a8da",
- "deleted_at": "2019-08-24T14:15:22Z",
- "status": "open",
- "_links": [
- {
- "href": "string",
- "rel": "draft"
}
], - "version": 0,
- "events": [
- {
- "event_type": "api-event",
- "id": "bd04c959-d159-49b4-a096-2d84e014a8da",
- "created_at": "2019-08-24T14:15:22Z",
- "created_by": "bd04c959-d159-49b4-a096-2d84e014a8da",
- "version": 0,
- "request": {
- "path": "string",
- "method": "string",
- "body": "string"
}, - "draft_id": "string"
}
], - "options": {
- "order_time_to_live": 94672800,
- "generate_order_id": "UUID",
- "order_id": "string",
- "replace": "order",
- "payout": {
- "rules": [
- {
- "account_id": "string",
- "rule_type": "order.items.store.id",
- "rule_id": "sc029",
- "rule_version": 1,
- "destinations": [
- {
- "type": "percentage",
- "value": 10,
- "destinations": [
- {
- "type": "flat_amount",
- "value": "500",
- "destination": "account-a"
}, - {
- "type": "remaining_amount",
- "destinations": [
- {
- "type": "percentage",
- "value": "5.0",
- "destination": "account-b"
}
]
}
]
}, - {
- "type": "flat_amount",
- "value": "500",
- "destination": "account-a"
}, - {
- "type": "remaining_amount",
- "destinations": [
- {
- "type": "percentage",
- "value": "5",
- "destination": "account-b"
}, - {
- "type": "percentage",
- "value": "95.0",
- "destination": "account-c"
}
]
}
], - "metadata": { }
}
], - "resolve_rule_id": "order.items.store.id",
- "resolve_rule_type": "string"
}, - "split_draft": false,
- "serial_order_number_suffix": false,
- "multiple_authorizations": false
}, - "order": {
- "customer": {
- "first_name": "John",
- "last_name": "Doe",
- "id": "string",
- "gender": "male",
- "email": "customer@example.com",
- "metadata": {
- "dob_year": 1985
}, - "phone_number": "+4799999999",
- "addresses": [
- {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO",
- "type": "string",
- "custom_type": "string"
}
], - "pays_tax": false,
- "date_of_birth": "1990-09-20",
- "favorite_store": "string",
- "company": {
- "organization_number": "123456789MVA",
- "bussiness_name": "TKP tech AS",
- "department": "sales department",
- "industry": "computer industry",
- "website": "string",
- "number_of_employees": "string"
}, - "marketing_consent": {
- "sms": {
- "consent": true,
- "updated_at": "2018-01-12T13:42:00Z"
}, - "email": {
- "consent": true,
- "updated_at": "2018-01-12T13:42:00Z"
}
}, - "status": "string",
- "term": {
- "id": "string"
}, - "type": "customer"
}, - "gross_amount": 59800,
- "net_amount": 47840,
- "total_discount": 23130,
- "total_manual_discount_amount": 0,
- "shipping_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO",
- "first_name": "John",
- "last_name": "Doe",
- "comment": "5th floor, use doorbell."
}, - "billing_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO",
- "first_name": "John",
- "last_name": "Doe",
- "comment": "5th floor, use doorbell."
}, - "metadata": { },
- "comment": "string",
- "salesperson_id": "string",
- "salesperson_name": "string",
- "delivery_at": "2019-08-24T14:15:22Z",
- "pickup_at": "2019-08-24T14:15:22Z",
- "courier_id": "string",
- "pre_order": true,
- "time_to_live": 94672800,
- "itinerary": [
- {
- "id": "string",
- "operator": "string",
- "arrival_address": {
- "id": "string",
- "name": "string",
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO",
- "external_ids": [
- {
- "id": "string",
- "source": "string",
- "description": "string"
}
]
}, - "arrival_at": "string",
- "departure_address": {
- "id": "string",
- "name": "string",
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO",
- "external_ids": [
- {
- "id": "string",
- "source": "string",
- "description": "string"
}
]
}, - "departure_at": "string",
- "travel_mode": "BUS",
- "route_id": "string",
- "vehicle_id": "string",
- "summary": "string",
- "distance": {
- "value": 0
}, - "duration": {
- "value": 0
}, - "tickets": [
- {
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "passenger_id": [
- "string"
]
}
], - "line_ids": [
- 0
], - "waypoints": [
- {
- "display_name": "string",
- "latitude": 0,
- "longitude": 0,
- "arrival_schedule_at": "string",
- "departure_schedule_at": "string"
}
]
}
], - "external_ids": [
- {
- "id": "string",
- "source": "string",
- "description": "string"
}
], - "items": [
- {
- "status": "string",
- "id": "175938",
- "metadata": { },
- "groups": [
- {
- "id": "B234",
- "name": "Stol"
}, - {
- "id": "B1",
- "name": "Møbel"
}
], - "line_id": 1,
- "quantity": 2,
- "gross_amount": 39800,
- "net_amount": 27840,
- "tax_lines": [
- {
- "amount": 5584,
- "amount_dwh": "5584.0440",
- "exempt": false,
- "included_in_price": true,
- "percentage": 25,
- "tax_basis": 27920,
- "tax_basis_dwh": "27920.22",
- "tax_code": "3",
- "tax_group": "Vmva-høy"
}
], - "description": "Stablestol for utendørsbruk",
- "description_alias": "Staplestol",
- "is_changed": false,
- "eligible_for_discount": true,
- "dimension": {
- "color": "string",
- "size": "string",
- "style": "string",
- "config": "string",
- "variant": "string"
}, - "discount_lines": [
- {
- "amount": 23130,
- "percentage": 10,
- "discount_type": "customer",
- "discount_id": "766da0ef-9283-42bd-b012-0582344ec53c",
- "description": "string",
- "line_id": 1
}
], - "additions": [
- {
- "id": "C1203",
- "description": "Extra Cheese",
- "quantity": 1,
- "gross_amount": 1000,
- "groups": [
- {
- "id": "B234",
- "name": "Stol"
}, - {
- "id": "B1",
- "name": "Møbel"
}
]
}
], - "store": {
- "id": "SL02",
- "organization_number": "123456789MVA",
- "name": "SC Oslo",
- "business_name": "SC Oslo AS",
- "comment": "string"
}, - "external_id": "SL02-94821948",
- "related_item": {
- "line_id": 0,
- "type": "required"
}, - "salesperson_id": "string",
- "salesperson_name": "string",
- "comment": "string",
- "version": 0,
- "reversed_reason": "string",
- "dynamic_payout": {
- "rule_type": "string",
- "rule_id": "string"
}, - "payout": {
- "account_id": "string",
- "rule_type": "order.items.store.id",
- "rule_id": "sc029",
- "rule_version": 1,
- "destinations": [
- {
- "type": "percentage",
- "value": "10",
- "destinations": [
- {
- "type": "flat_amount",
- "value": "500",
- "destination": "account-a",
- "amount": 500
}, - {
- "type": "remaining_amount",
- "destinations": [
- {
- "type": "percentage",
- "value": "5.0",
- "destination": "account-b",
- "amount": 3500
}
]
}
], - "amount": 4000
}, - {
- "type": "flat_amount",
- "value": "500",
- "destination": "account-a",
- "amount": 500
}, - {
- "type": "remaining_amount",
- "destinations": [
- {
- "type": "percentage",
- "value": "5",
- "destination": "account-b",
- "amount": 192
}, - {
- "type": "percentage",
- "value": "95.0",
- "destination": "account-c",
- "amount": 38308
}
]
}
], - "metadata": { }
}
}
], - "version": 0,
- "type": "delivery",
- "order_number": "order123456",
- "currency": "NOK",
- "order_id": "string",
- "time_to_live_expires_at": "string",
- "multiple_authorizations": true,
- "discounts": [
- {
- "id": "string",
- "refs": [
- {
- "id": "string",
- "amount": 0,
- "statistics": {
- "amount": 0,
- "stamp": 0,
- "usage": 0
}, - "stamp": 0,
- "usages": 0,
- "items": [
- {
- "line_id": 0,
- "amount": 0
}
]
}
]
}
], - "store": {
- "id": "SL02",
- "organization_number": "123456789MVA",
- "name": "SC Oslo",
- "business_name": "SC Oslo AS",
- "comments": [
- "string"
]
}, - "external_links": [
- {
- "text": "Order Receipt",
- "public": true
}
], - "attachments": [
- {
- "id": "string",
- "bus_reservation": {
- "booking_id": "NE 138 47794",
- "line_ids": [
- 0
], - "passengers": [
- {
- "id": "string",
- "title": "string",
- "first_name": "string",
- "last_name": "string"
}
], - "itinerary": [
- {
- "departure_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "departure_at": "2019-08-24T14:15:22Z",
- "arrival_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "arrival_at": "2019-08-24T14:15:22Z",
- "operator": "SAS",
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "activates_at": "2019-08-24T14:15:22Z",
- "passenger_id": [
- "string"
]
}
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}, - "car_reservation": {
- "booking_id": "TV 347794",
- "line_ids": [
- 0
], - "itinerary": [
- {
- "rental_company": "Avis",
- "drivers_id": [
- "string"
], - "pick_up_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "pick_up_at": "2019-08-24T14:15:22Z",
- "drop_off_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "drop_off_at": "2019-08-24T14:15:22Z",
- "class": "string"
}
], - "drivers": [
- "string"
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}, - "ferry_reservation": {
- "booking_id": "NE 138 47794",
- "line_ids": [
- 0
], - "passengers": [
- {
- "id": "string",
- "title": "string",
- "first_name": "string",
- "last_name": "string"
}
], - "itinerary": [
- {
- "departure_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "departure_at": "2019-08-24T14:15:22Z",
- "arrival_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "arrival_at": "2019-08-24T14:15:22Z",
- "operator": "SAS",
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "activates_at": "2019-08-24T14:15:22Z",
- "passenger_id": [
- "string"
]
}
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}, - "metro_reservation": {
- "booking_id": "NE 138 47794",
- "line_ids": [
- 0
], - "passengers": [
- {
- "id": "string",
- "title": "string",
- "first_name": "string",
- "last_name": "string"
}
], - "itinerary": [
- {
- "departure_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "departure_at": "2019-08-24T14:15:22Z",
- "arrival_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "arrival_at": "2019-08-24T14:15:22Z",
- "operator": "SAS",
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "activates_at": "2019-08-24T14:15:22Z",
- "passenger_id": [
- "string"
]
}
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}, - "taxi_reservation": {
- "booking_id": "NE 138 47794",
- "line_ids": [
- 0
], - "passengers": [
- {
- "id": "string",
- "title": "string",
- "first_name": "string",
- "last_name": "string"
}
], - "itinerary": [
- {
- "departure_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "departure_at": "2019-08-24T14:15:22Z",
- "arrival_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "arrival_at": "2019-08-24T14:15:22Z",
- "operator": "SAS",
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "activates_at": "2019-08-24T14:15:22Z",
- "passenger_id": [
- "string"
]
}
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}, - "train_reservation": {
- "booking_id": "NE 138 47794",
- "line_ids": [
- 0
], - "passengers": [
- {
- "id": "string",
- "title": "string",
- "first_name": "string",
- "last_name": "string"
}
], - "itinerary": [
- {
- "departure_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "departure_at": "2019-08-24T14:15:22Z",
- "arrival_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "arrival_at": "2019-08-24T14:15:22Z",
- "operator": "SAS",
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "activates_at": "2019-08-24T14:15:22Z",
- "passenger_id": [
- "string"
]
}
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}, - "tram_reservation": {
- "booking_id": "NE 138 47794",
- "line_ids": [
- 0
], - "passengers": [
- {
- "id": "string",
- "title": "string",
- "first_name": "string",
- "last_name": "string"
}
], - "itinerary": [
- {
- "departure_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "departure_at": "2019-08-24T14:15:22Z",
- "arrival_address": {
- "address_line": "Sommerkroveien 34",
- "address_line_2": "PB 123",
- "postal_code": "0349",
- "postal_place": "Oslo",
- "latitude": 59.942112,
- "longitude": 10.716991,
- "country": "NO"
}, - "arrival_at": "2019-08-24T14:15:22Z",
- "operator": "SAS",
- "class": "string",
- "line": "string",
- "seat": "string",
- "zone": "string",
- "expires_at": "2019-08-24T14:15:22Z",
- "activates_at": "2019-08-24T14:15:22Z",
- "passenger_id": [
- "string"
]
}
], - "insurance": [
- {
- "insurance_company": "string",
- "insurance_type": "string"
}
]
}
}
], - "stores": [
- {
- "id": "SL02",
- "organization_number": "123456789MVA",
- "name": "SC Oslo",
- "business_name": "SC Oslo AS",
- "comments": [
- "string"
]
}
]
}
}
Remove a item line from the draft
scopes:
aid required | string <^[PT]{1}\d{8}$> = 9 characters An id that uniquely identifies the account. |
id required | string <uuid> The resource identifier string |
line_id required | integer The resource identifier string |
apply_discounts | boolean Default: false Calculate available discounts and apply them to the order. Requires additional scope for accessing the DealEngine, one of
The
|