Shopping API (2020-05-01)

API Integration Support: integration@dintero.com License: UNLICENSED

API for cart and orders

Changelog

All notable changes to the API.

2021-01-10

2021-01-08

  • Extend order item with optional external_id property

2021-01-06

2021-01-01

  • Extend the Order itinerary with new properties
    • Add support for route_id and vehicle_id.
    • Add support for external_ids in arrival_address and departure_address

2020-11-01

2020-09-01

  • 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 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)

2020-08-01

  • Create order with custom order_id. The new property is only supported when creating draft with split_draft=false. The order.order_id will be set to order.id if no order_id is provied.

2020-07-01

  • Extend order with external_ids
  • Extend order with external_links.
  • Extend order itinerary and attachments
    • Add name and id to itinerary arrival_address and `departure_address. Make all address properties options
    • Add line_ids and id to itinerary and attachments
    • Add operator to itinerary
    • Extend itinerary.travel_mode with CUSTOM
  • Extend order events with event_type to support event types api-event and service-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 and attachment 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 and payment_details.

2020-06-01

draft

  • 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.

draft

  • Extend order item with attachment. Add support for including details about car, bus and train reservation as attachment in order items.

2020-05-01

draft

  • 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.

order

  • 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

2019-07-01

orders Extend order definitions with Discounts

orders store orders add support for include_events on order requests. The order event state and events list will be included in the response.

2019-06-01

draft orders

  • extend draft definition with optional options.serial_order_number_suffix property.

orders

  • extend order definition with courier_id and pickup_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.

events

  • allow scopes
    • read:shopping:/orders/ANY/events
    • write:shopping:/orders/ANY/events

2019-05-01

draft orders

  • filter by status: open, completed, deleted
  • filter by created_at.gte and created_at.lte

customer orders

  • filter by status: open, closed, cancelled
  • filter by payment_status: pending, partially_paid, paid, partially_refunded, refunded
  • filter by created_at.gte and created_at.lte

store orders

  • filter by status: open, closed, cancelled
  • filter by payment_status: pending, partially_paid, paid, partially_refunded, refunded
  • filter by created_at.gte and created_at.lte

orders

  • filter by status: open, closed, cancelled
  • filter by payment_status: pending, partially_paid, paid, partially_refunded, refunded
  • filter by created_at.gte and created_at.lte
  • accept any customer.id format

order payments

2019-04-01

store orders

customer orders

  • Remove uuid format requirement on customer_id path parameter

complete draft order

  • remove support for apply_discounts query parameter, the parameter will only be supported from endpoints updating the draft order.

2019-03-02

complete 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/

order

  • Add salesperson_id and salesperson_name properties
  • Add delivery_at property for specifying when the order should be delivered (in the future)

order item

  • Require percentage in tax_lines for an order item
  • Add quantity property to item.additions, and allow negative gross_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 and salesperson_name property

2019-02-27

order item

  • 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

order

  • Add comment property for recording customer comments on the order

Webhooks

Use webhooks to get notification on shopping events. See Create new subscription for details on how to create a webhooks subscription

Events

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

Draft

Create a draft order

Use this resource to create orders in draft state.

scopes:

  • admin:shopping
  • write:shopping
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

query Parameters
apply_discounts
boolean
Default: false

Calculate available discounts and apply them to the order.

Requires additional scope for accessing the DealEngine, one of

  • admin:discounts
  • write:discounts
  • write:discounts:/available_for_receipt

The tax_lines will be updated if apply_discount results in new net_amount.

  • net_amount = gross_amount - Σ discount_lines.amount

tax_line.amount will be calculated from tax_line.percentage and net_amount.

Request Body schema: application/json
required

draft order resource

required
object (OrderObject)
object

Responses

Request samples

Content type
application/json
{
  • "options": {
    },
  • "order": {
    }
}

Response samples

Content type
application/json
{
  • "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": [
    ],
  • "version": 0,
  • "events": [
    ],
  • "options": {
    },
  • "order": {
    }
}

Get draft order

Get draft order.

scopes:

  • admin:shopping
  • read:shopping
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

id
required
string <uuid>

The resource identifier string

Responses

Response samples

Content type
application/json
{
  • "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": [
    ],
  • "version": 0,
  • "events": [
    ],
  • "options": {
    },
  • "order": {
    }
}

Update draft order

Updates a draft order.

scopes:

  • admin:shopping
  • write:shopping
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

id
required
string <uuid>

The resource identifier string

query Parameters
apply_discounts
boolean
Default: false

Calculate available discounts and apply them to the order.

Requires additional scope for accessing the DealEngine, one of

  • admin:discounts
  • write:discounts
  • write:discounts:/available_for_receipt

The tax_lines will be updated if apply_discount results in new net_amount.

  • net_amount = gross_amount - Σ discount_lines.amount

tax_line.amount will be calculated from tax_line.percentage and net_amount.

Request Body schema: application/json
required

draft order resource

required
object (OrderObject)
object

Responses

Request samples

Content type
application/json
{
  • "options": {
    },
  • "order": {
    }
}

Response samples

Content type
application/json
{
  • "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": [
    ],
  • "version": 0,
  • "events": [
    ],
  • "options": {
    },
  • "order": {
    }
}

Complete a draft 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:

  • admin:shopping
  • write:shopping
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

id
required
string <uuid>

The resource identifier string

Request Body schema: application/json
required

draft order resource

object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "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": [
    ],
  • "orders": [
    ]
}

Draft items

Add item to draft

Updates a draft with new item

scopes:

  • admin:shopping
  • write:shopping
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

id
required
string <uuid>

The resource identifier string

query Parameters
apply_discounts
boolean
Default: false

Calculate available discounts and apply them to the order.

Requires additional scope for accessing the DealEngine, one of

  • admin:discounts
  • write:discounts
  • write:discounts:/available_for_receipt

The tax_lines will be updated if apply_discount results in new net_amount.

  • net_amount = gross_amount - Σ discount_lines.amount

tax_line.amount will be calculated from tax_line.percentage and net_amount.

Request Body schema: application/json
required

draft line item resource

gross_amount
required
integer

Monetary amount in smallest unit for the currency before discounts

required
Array of objects (TaxItem) non-empty
id
string

The ID or SKU of the product on the line

status
string

The item status

metadata
object

Additional details about the item, key values will be included as extra_info in the receipt.

Array of objects

The groups the product on the line belongs to

line_id
integer

The number of the line (or id), must be unique between all items.

quantity
number
Default: 1

The quantity of the product in the item line.

description
string
description_alias
string

Short description / title of the product

eligible_for_discount
boolean
object (Dimension)

Identify item attributes, such as size and color

Array of objects (DiscountItem)
Array of objects

Additions, customization of the item. The gross_amount for an addition should be included in the item gross_amount and included in the tax_lines if applicable.

object
external_id
string

External ID related to the item.

object

Relationship with another line item.

An item with a required relationship with another line item will be removed from the order if the related item is removed

An item with optional relationship will remain in the order if the related line is removed, the related_item will be cleared as the line it relates to does not exist anymore

An item with reversed relationship is an item that is reversing another item. An item with the reversed relationship we be removed from the order if the related item is removed

salesperson_id
string

Id of the sales person if other then the operator

salesperson_name
string

Name of the sales person

comment
string <= 255 characters

comment on the item

reversed_reason
string

Reverse the item from an order

Applicable only if the draft is created to update an existing order

object

Specify the payout rule that should be used when calculating the payout split for this item.

Responses

Request samples

Content type
application/json
{
  • "id": "175938",
  • "status": "string",
  • "metadata": { },
  • "groups": [
    ],
  • "line_id": 1,
  • "quantity": 2,
  • "gross_amount": 39800,
  • "tax_lines": [
    ],
  • "description": "Stablestol for utendørsbruk",
  • "description_alias": "Staplestol",
  • "eligible_for_discount": true,
  • "dimension": {
    },
  • "discount_lines": [
    ],
  • "additions": [
    ],
  • "store": {
    },
  • "external_id": "SL02-94821948",
  • "related_item": {
    },
  • "salesperson_id": "string",
  • "salesperson_name": "string",
  • "comment": "string",
  • "reversed_reason": "string",
  • "dynamic_payout": {
    }
}

Response samples

Content type
application/json
{
  • "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": [
    ],
  • "version": 0,
  • "events": [
    ],
  • "options": {
    },
  • "order": {
    }
}

Remove item from draft

Remove a item line from the draft

scopes:

  • admin:shopping
  • write:shopping
path Parameters
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

query Parameters
apply_discounts
boolean
Default: false

Calculate available discounts and apply them to the order.

Requires additional scope for accessing the DealEngine, one of

  • admin:discounts
  • write:discounts
  • write:discounts:/available_for_receipt

The tax_lines will be updated if apply_discount results in new net_amount.

  • net_amount = gross_amount - Σ discount_lines.amount

tax_line.amount will be calculated from tax_line.percentage and net_amount.

Responses

Response samples

Content type
application/json
{
  • "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": [
    ],
  • "version": 0,
  • "events": [
    ],
  • "options": {
    },
  • "order": {
    }
}

Update item in draft

Update item in draft

scopes:

  • admin:shopping
  • write:shopping
path Parameters
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

query Parameters
apply_discounts
boolean
Default: false

Calculate available discounts and apply them to the order.

Requires additional scope for accessing the DealEngine, one of

  • admin:discounts
  • write:discounts
  • write:discounts:/available_for_receipt

The tax_lines will be updated if apply_discount results in new net_amount.

  • net_amount = gross_amount - Σ discount_lines.amount

tax_line.amount will be calculated from tax_line.percentage and net_amount.

Request Body schema: application/json
required

draft line item resource

gross_amount
required
integer

Monetary amount in smallest unit for the currency before discounts

required
Array of objects (TaxItem) non-empty
id
string

The ID or SKU of the product on the line

status
string

The item status

metadata
object

Additional details about the item, key values will be included as extra_info in the receipt.

Array of objects

The groups the product on the line belongs to

line_id
integer

The number of the line (or id), must be unique between all items.

quantity
number
Default: 1

The quantity of the product in the item line.

description
string
description_alias
string

Short description / title of the product

eligible_for_discount
boolean
object (Dimension)

Identify item attributes, such as size and color

Array of objects (DiscountItem)
Array of objects

Additions, customization of the item. The gross_amount for an addition should be included in the item gross_amount and included in the tax_lines if applicable.

object
external_id
string

External ID related to the item.

object

Relationship with another line item.

An item with a required relationship with another line item will be removed from the order if the related item is removed

An item with optional relationship will remain in the order if the related line is removed, the related_item will be cleared as the line it relates to does not exist anymore

An item with reversed relationship is an item that is reversing another item. An item with the reversed relationship we be removed from the order if the related item is removed

salesperson_id
string

Id of the sales person if other then the operator

salesperson_name
string

Name of the sales person

comment
string <= 255 characters

comment on the item

reversed_reason
string

Reverse the item from an order

Applicable only if the draft is created to update an existing order

object

Specify the payout rule that should be used when calculating the payout split for this item.

Responses

Request samples

Content type
application/json
{
  • "id": "175938",
  • "status": "string",
  • "metadata": { },
  • "groups": [
    ],
  • "line_id": 1,
  • "quantity": 2,
  • "gross_amount": 39800,
  • "tax_lines": [
    ],
  • "description": "Stablestol for utendørsbruk",
  • "description_alias": "Staplestol",
  • "eligible_for_discount": true,
  • "dimension": {
    },
  • "discount_lines": [
    ],
  • "additions": [
    ],
  • "store": {
    },
  • "external_id": "SL02-94821948",
  • "related_item": {
    },
  • "salesperson_id": "string",
  • "salesperson_name": "string",
  • "comment": "string",
  • "reversed_reason": "string",
  • "dynamic_payout": {
    }
}

Response samples

Content type
application/json
{
  • "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": [
    ],
  • "version": 0,
  • "events": [
    ],
  • "options": {
    },
  • "order": {
    }
}

Order

Get Order

Retrieve Order details

scopes:

  • admin:shopping
  • read:shopping
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

order_id
required
string

The resource identifier string

query Parameters
include_events
Array of strings
Default: "false"
Items Enum: "false" "true" "api-event" "service-event"

include order events in response

Responses

Response samples

Content type
application/json
{
  • "id": "bd04c959-d159-49b4-a096-2d84e014a8da",
  • "created_at": "2019-08-24T14:15:22Z",
  • "created_by": "bd04c959-d159-49b4-a096-2d84e014a8da",
  • "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": {
    },
  • "gross_amount": 59800,
  • "net_amount": 47840,
  • "total_discount": 23130,
  • "total_manual_discount_amount": 0,
  • "shipping_address": {
    },
  • "billing_address": {
    },
  • "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": [
    ],
  • "external_ids": [
    ],
  • "items": [
    ],
  • "version": 0,
  • "type": "delivery",
  • "order_number": "order123456",
  • "currency": "NOK",
  • "order_id": "string",
  • "time_to_live_expires_at": "string",
  • "multiple_authorizations": true,
  • "payment_details": {
    },
  • "sessions": [
    ],
  • "authorizations": [
    ],
  • "captures": [
    ],
  • "refunds": [
    ],
  • "cancellations": [
    ],
  • "discounts": [
    ],
  • "store": {
    },
  • "external_links": [],
  • "attachments": [
    ],
  • "comments": [
    ],
  • "delivery_id": "string",
  • "_links": [
    ],
  • "state": "string",
  • "events": [
    ]
}

Put Order

Update an order

scopes:

  • admin:shopping
  • read:shopping
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

order_id
required
string

The resource identifier string

query Parameters
include_events
Array of strings
Default: "false"
Items Enum: "false" "true" "api-event" "service-event"

include order events in response

Request Body schema: application/json
required
object (Customer)
object (ContactObject)
object (ContactObject)
metadata
object

Additional data related to the order

comment
string <= 255 characters

Comment on the order

salesperson_id
string

Id of the sales person if other then the operator

salesperson_name
string

Name of the sales person

delivery_at
string <date-time>

Requested delivery time by the customer, default value is ASAP relative to when the order was created.

pickup_at
string <date-time>

Requested pickup time for the courier

courier_id
string

Id of the courier responsible for the delivery

pre_order
boolean

Customer requested the delivery to be later, i.e not ASAP, see delivery_at for when the delivery should be completed.

time_to_live
integer >= 86400

Time-To-Live (TTL) for the order created in seconds. The value is interpreted as a delta from the time that an order was last modified (update_at).

All drafts related to an order will be deleted when the TTL expires and the order will be emptied for all data except

  • order_number
  • order_id
  • external_ids
  • created_at
  • updated_at
  • deleted_at
Array of objects (OrderTravelItinerary)
Array of objects (OrderExternalId)
Array of objects

Update status on order items

Array of objects (OrderExternalLink)

order update resource

Responses

Request samples

Content type
application/json
{
  • "customer": {
    },
  • "shipping_address": {
    },
  • "billing_address": {
    },
  • "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": [
    ],
  • "external_ids": [
    ],
  • "items": [
    ],
  • "external_links": []
}

Response samples

Content type
application/json
{
  • "id": "bd04c959-d159-49b4-a096-2d84e014a8da",
  • "created_at": "2019-08-24T14:15:22Z",
  • "created_by": "bd04c959-d159-49b4-a096-2d84e014a8da",
  • "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": {
    },
  • "gross_amount": 59800,
  • "net_amount": 47840,
  • "total_discount": 23130,
  • "total_manual_discount_amount": 0,
  • "shipping_address": {
    },
  • "billing_address": {
    },
  • "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": [
    ],
  • "external_ids": [
    ],
  • "items": [
    ],
  • "version": 0,
  • "type": "delivery",
  • "order_number": "order123456",
  • "currency": "NOK",
  • "order_id": "string",
  • "time_to_live_expires_at": "string",
  • "multiple_authorizations": true,
  • "payment_details": {
    },
  • "sessions": [
    ],
  • "authorizations": [
    ],
  • "captures": [
    ],
  • "refunds": [
    ],
  • "cancellations": [
    ],
  • "discounts": [
    ],
  • "store": {
    },
  • "external_links": [],
  • "attachments": [
    ],
  • "comments": [
    ],
  • "delivery_id": "string",
  • "_links": [
    ],
  • "state": "string",
  • "events": [
    ]
}

Events

Create an order event

Create a new order event

scopes:

  • admin:shopping
  • write:shopping
  • write:shopping:/orders/ANY/events
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

order_id
required
string

The resource identifier string

Request Body schema: application/json
required

order event

state
required
string
Default: "success"
Enum: "error" "failure" "success" "pending"

The state of the event

service
required
string

The type of service used, used to differentiate this status from other services

service_status
required
string

The status reported by the service

description
string

A short description of the reason for the status

metadata
object

Additional service data related to the event

Responses

Request samples

Content type
application/json
{
  • "state": "error",
  • "description": "food prepared",
  • "service": "string",
  • "service_status": "ready_for_pickup",
  • "metadata": {
    }
}

Response samples

Content type
application/json
Example
{
  • "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": {
    },
  • "draft_id": "string"
}

Comments

Create an order comment

Create a new order comment

scopes:

  • admin:shopping
  • write:shopping
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

order_id
required
string

The resource identifier string

query Parameters
include_events
Array of strings
Default: "false"
Items Enum: "false" "true" "api-event" "service-event"

include order events in response

Request Body schema: application/json
required
body
required
string
visibility
string
Default: "private"
Enum: "private" "public"

The comment is private, hidden from the customer

Responses

Request samples

Content type
application/json
{
  • "body": "string",
  • "visibility": "private"
}

Response samples

Content type
application/json
{
  • "id": "bd04c959-d159-49b4-a096-2d84e014a8da",
  • "created_at": "2019-08-24T14:15:22Z",
  • "created_by": "bd04c959-d159-49b4-a096-2d84e014a8da",
  • "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": {
    },
  • "gross_amount": 59800,
  • "net_amount": 47840,
  • "total_discount": 23130,
  • "total_manual_discount_amount": 0,
  • "shipping_address": {
    },
  • "billing_address": {
    },
  • "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": [
    ],
  • "external_ids": [
    ],
  • "items": [
    ],
  • "version": 0,
  • "type": "delivery",
  • "order_number": "order123456",
  • "currency": "NOK",
  • "order_id": "string",
  • "time_to_live_expires_at": "string",
  • "multiple_authorizations": true,
  • "payment_details": {
    },
  • "sessions": [
    ],
  • "authorizations": [
    ],
  • "captures": [
    ],
  • "refunds": [
    ],
  • "cancellations": [
    ],
  • "discounts": [
    ],
  • "store": {
    },
  • "external_links": [],
  • "attachments": [
    ],
  • "comments": [
    ],
  • "delivery_id": "string",
  • "_links": [
    ],
  • "state": "string",
  • "events": [
    ]
}

Delete an order comment

Delete an order comment

scopes:

  • admin:shopping
  • write:shopping
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

order_id
required
string

The resource identifier string

comment_id
required
string

The resource identifier string

query Parameters
include_events
Array of strings
Default: "false"
Items Enum: "false" "true" "api-event" "service-event"

include order events in response

Responses

Response samples

Content type
application/json
{
  • "id": "bd04c959-d159-49b4-a096-2d84e014a8da",
  • "created_at": "2019-08-24T14:15:22Z",
  • "created_by": "bd04c959-d159-49b4-a096-2d84e014a8da",
  • "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": {
    },
  • "gross_amount": 59800,
  • "net_amount": 47840,
  • "total_discount": 23130,
  • "total_manual_discount_amount": 0,
  • "shipping_address": {
    },
  • "billing_address": {
    },
  • "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": [
    ],
  • "external_ids": [
    ],
  • "items": [
    ],
  • "version": 0,
  • "type": "delivery",
  • "order_number": "order123456",
  • "currency": "NOK",
  • "order_id": "string",
  • "time_to_live_expires_at": "string",
  • "multiple_authorizations": true,
  • "payment_details": {
    },
  • "sessions": [
    ],
  • "authorizations": [
    ],
  • "captures": [
    ],
  • "refunds": [
    ],
  • "cancellations": [
    ],
  • "discounts": [
    ],
  • "store": {
    },
  • "external_links": [],
  • "attachments": [
    ],
  • "comments": [
    ],
  • "delivery_id": "string",
  • "_links": [
    ],
  • "state": "string",
  • "events": [
    ]
}

Status

Cancel Order

Cancel the Order

scopes:

  • admin:shopping
  • write:shopping

A cancel event will be added to the order

path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

order_id
required
string

The resource identifier string

query Parameters
include_events
Array of strings
Default: "false"
Items Enum: "false" "true" "api-event" "service-event"

include order events in response

Request Body schema: application/json
required

order resource

cancelled_reason
any

The reason why the order was canceled.

  • customer: The customer cancelled the order
  • declined: The payment was declined
  • other: Any reson

Responses

Request samples

Content type
application/json
{
  • "cancelled_reason": "customer"
}

Response samples

Content type
application/json
{
  • "id": "bd04c959-d159-49b4-a096-2d84e014a8da",
  • "created_at": "2019-08-24T14:15:22Z",
  • "created_by": "bd04c959-d159-49b4-a096-2d84e014a8da",
  • "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": {
    },
  • "gross_amount": 59800,
  • "net_amount": 47840,
  • "total_discount": 23130,
  • "total_manual_discount_amount": 0,
  • "shipping_address": {
    },
  • "billing_address": {
    },
  • "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": [
    ],
  • "external_ids": [
    ],
  • "items": [
    ],
  • "version": 0,
  • "type": "delivery",
  • "order_number": "order123456",
  • "currency": "NOK",
  • "order_id": "string",
  • "time_to_live_expires_at": "string",
  • "multiple_authorizations": true,
  • "payment_details": {
    },
  • "sessions": [
    ],
  • "authorizations": [
    ],
  • "captures": [
    ],
  • "refunds": [
    ],
  • "cancellations": [
    ],
  • "discounts": [
    ],
  • "store": {
    },
  • "external_links": [],
  • "attachments": [
    ],
  • "comments": [
    ],
  • "delivery_id": "string",
  • "_links": [
    ],
  • "state": "string",
  • "events": [
    ]
}

Close order

Close the order

scopes:

  • admin:shopping
  • write:shopping

A close event will be added to the order

path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

order_id
required
string

The resource identifier string

query Parameters
include_events
Array of strings
Default: "false"
Items Enum: "false" "true" "api-event" "service-event"

include order events in response

Responses

Response samples

Content type
application/json
{
  • "id": "bd04c959-d159-49b4-a096-2d84e014a8da",
  • "created_at": "2019-08-24T14:15:22Z",
  • "created_by": "bd04c959-d159-49b4-a096-2d84e014a8da",
  • "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": {
    },
  • "gross_amount": 59800,
  • "net_amount": 47840,
  • "total_discount": 23130,
  • "total_manual_discount_amount": 0,
  • "shipping_address": {
    },
  • "billing_address": {
    },
  • "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": [
    ],
  • "external_ids": [
    ],
  • "items": [
    ],
  • "version": 0,
  • "type": "delivery",
  • "order_number": "order123456",
  • "currency": "NOK",
  • "order_id": "string",
  • "time_to_live_expires_at": "string",
  • "multiple_authorizations": true,
  • "payment_details": {
    },
  • "sessions": [
    ],
  • "authorizations": [
    ],
  • "captures": [
    ],
  • "refunds": [
    ],
  • "cancellations": [
    ],
  • "discounts": [
    ],
  • "store": {
    },
  • "external_links": [],
  • "attachments": [
    ],
  • "comments": [
    ],
  • "delivery_id": "string",
  • "_links": [
    ],
  • "state": "string",
  • "events": [
    ]
}

Open order

Re-open a closed order

scopes:

  • admin:shopping
  • write:shopping

A open event will be added to the order

path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

order_id
required
string

The resource identifier string

query Parameters
include_events
Array of strings
Default: "false"
Items Enum: "false" "true" "api-event" "service-event"

include order events in response

Responses

Response samples

Content type
application/json
{
  • "id": "bd04c959-d159-49b4-a096-2d84e014a8da",
  • "created_at": "2019-08-24T14:15:22Z",
  • "created_by": "bd04c959-d159-49b4-a096-2d84e014a8da",
  • "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": {
    },
  • "gross_amount": 59800,
  • "net_amount": 47840,
  • "total_discount": 23130,
  • "total_manual_discount_amount": 0,
  • "shipping_address": {
    },
  • "billing_address": {
    },
  • "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": [
    ],
  • "external_ids": [
    ],
  • "items": [
    ],
  • "version": 0,
  • "type": "delivery",
  • "order_number": "order123456",
  • "currency": "NOK",
  • "order_id": "string",
  • "time_to_live_expires_at": "string",
  • "multiple_authorizations": true,
  • "payment_details": {
    },
  • "sessions": [
    ],
  • "authorizations": [
    ],
  • "captures": [
    ],
  • "refunds": [
    ],
  • "cancellations": [
    ],
  • "discounts": [
    ],
  • "store": {
    },
  • "external_links": [],
  • "attachments": [
    ],
  • "comments": [
    ],
  • "delivery_id": "string",
  • "_links": [
    ],
  • "state": "string",
  • "events": [
    ]
}

Session

Create a session

Initiate a payment session for the order.

scopes:

  • admin:shopping
  • write:shopping

A session event will be added to the order

path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

order_id
required
string

The resource identifier string

Request Body schema: application/json
required

order session

required
Array of objects

Selected items from the order

required
object (SessionUrls)
profile_id
required
string

Configuration profile for the session to create

processed_at
string <date-time>

The date and time when the capture was processed by payment gateway

metadata
object

Additional details about the operation

object

Present only for Express Checkout sessions.

An Express Checkout session is a session where the end user will submit a shipping address and then select a shipping option before the before a payment method is selected and the payment is initiated.

Endpoints used in the Express Checkout flow.

  1. Set shipping address
  2. Set shipping option
merchant_reference
string
object (ShippingOption)

A shipping option

Responses

Request samples

Content type
application/json
{
  • "items": [
    ],
  • "processed_at": "2019-08-24T14:15:22Z",
  • "metadata": { },
  • "express": {
    },
  • "profile_id": "string",
  • "url": {},
  • "merchant_reference": "string",
  • "shipping_option": {
    }
}

Response samples

Content type
application/json
{
  • "id": "bd04c959-d159-49b4-a096-2d84e014a8da",
  • "created_at": "2019-08-24T14:15:22Z",
  • "created_by": "bd04c959-d159-49b4-a096-2d84e014a8da",
  • "amount": 27840,
  • "items": [
    ],
  • "processed_at": "2019-08-24T14:15:22Z",
  • "metadata": { },
  • "_links": [
    ]
}

Get Session details

Retrieve details about a session

scopes:

  • admin:shopping
  • read:shopping
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

order_id
required
string

The resource identifier string

session_id
required
string

The resource identifier string

Responses

Response samples

Content type
application/json
{
  • "id": "bd04c959-d159-49b4-a096-2d84e014a8da",
  • "created_at": "2019-08-24T14:15:22Z",
  • "created_by": "bd04c959-d159-49b4-a096-2d84e014a8da",
  • "amount": 27840,
  • "items": [
    ],
  • "processed_at": "2019-08-24T14:15:22Z",
  • "metadata": { },
  • "_links": [
    ]
}

Authorizations

Create an authorization

Create a authorization for an order

scopes:

  • admin:shopping
  • write:shopping

An authorization event will be added to the order

path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

order_id
required
string

The resource identifier string

Request Body schema: application/json
required

order capture

required
Array of objects

Selected items from the order

processed_at
string <date-time>

The date and time when the payment operation was processed by payment gateway

processed_by
string

The gateway the processed the payment operation

object
metadata
object

Additional details about the operation

success
boolean

The result from the operation.

authorization_id
string <= 40 characters

The authorization for this operation. Only included if the order was created with multiple_authorizations option enabled

Responses

Request samples

Content type
application/json
{
  • "items": [
    ],
  • "processed_at": "2019-08-24T14:15:22Z",
  • "processed_by": "dintero-checkout",
  • "payment_details": {
    },
  • "metadata": { },
  • "success": true,
  • "authorization_id": "bd04c959-d159-49b4-a096-2d84e014a8da"
}

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "processed_at": "2019-08-24T14:15:22Z",
  • "processed_by": "dintero-checkout",
  • "payment_details": {
    },
  • "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": [
    ],
  • "authorization_id": "bd04c959-d159-49b4-a096-2d84e014a8da"
}

Get Authorization details

Retrieve details about a authorization

scopes:

  • admin:shopping
  • read:shopping
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

order_id
required
string

The resource identifier string

authorization_id
required
string <uuid>

The resource identifier string

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "processed_at": "2019-08-24T14:15:22Z",
  • "processed_by": "dintero-checkout",
  • "payment_details": {
    },
  • "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": [
    ],
  • "authorization_id": "bd04c959-d159-49b4-a096-2d84e014a8da"
}

Captures

Create a capture

Create a capture for an order

scopes:

  • admin:shopping
  • write:shopping

A capture event will be added to the order

path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

order_id
required
string

The resource identifier string

Request Body schema: application/json
required

order capture

required
Array of objects

Selected items from the order

processed_at
string <date-time>

The date and time when the payment operation was processed by payment gateway

processed_by
string

The gateway the processed the payment operation

object
metadata
object

Additional details about the operation

success
boolean

The result from the operation.

authorization_id
string <= 40 characters

The authorization for this operation. Only included if the order was created with multiple_authorizations option enabled

Responses

Request samples

Content type
application/json
{
  • "items": [
    ],
  • "processed_at": "2019-08-24T14:15:22Z",
  • "processed_by": "dintero-checkout",
  • "payment_details": {
    },
  • "metadata": { },
  • "success": true,
  • "authorization_id": "bd04c959-d159-49b4-a096-2d84e014a8da"
}

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "processed_at": "2019-08-24T14:15:22Z",
  • "processed_by": "dintero-checkout",
  • "payment_details": {
    },
  • "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": [
    ],
  • "authorization_id": "bd04c959-d159-49b4-a096-2d84e014a8da"
}

Get Capture details

Retrieve details about a capture

scopes:

  • admin:shopping
  • read:shopping
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

order_id
required
string

The resource identifier string

capture_id
required
string <uuid>

The resource identifier string

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "processed_at": "2019-08-24T14:15:22Z",
  • "processed_by": "dintero-checkout",
  • "payment_details": {
    },
  • "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": [
    ],
  • "authorization_id": "bd04c959-d159-49b4-a096-2d84e014a8da"
}

Refunds

Create a refund

Create a refund for an order

scopes:

  • admin:shopping
  • write:shopping

A refund event will be added to the order

path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

order_id
required
string

The resource identifier string

Request Body schema: application/json
required

order refund

required
Array of objects

Selected items from the order

processed_at
string <date-time>

The date and time when the payment operation was processed by payment gateway

processed_by
string

The gateway the processed the payment operation

object
metadata
object

Additional details about the operation

success
boolean

The result from the operation.

authorization_id
string <= 40 characters

The authorization for this operation. Only included if the order was created with multiple_authorizations option enabled

Responses

Request samples

Content type
application/json
{
  • "items": [
    ],
  • "processed_at": "2019-08-24T14:15:22Z",
  • "processed_by": "dintero-checkout",
  • "payment_details": {
    },
  • "metadata": { },
  • "success": true,
  • "authorization_id": "bd04c959-d159-49b4-a096-2d84e014a8da"
}

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "processed_at": "2019-08-24T14:15:22Z",
  • "processed_by": "dintero-checkout",
  • "payment_details": {
    },
  • "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": [
    ],
  • "authorization_id": "bd04c959-d159-49b4-a096-2d84e014a8da"
}

Get Refunds details

Retrieve specific refund

scopes:

  • admin:shopping
  • read:shopping
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

order_id
required
string

The resource identifier string

refund_id
required
string <uuid>

The resource identifier string

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "processed_at": "2019-08-24T14:15:22Z",
  • "processed_by": "dintero-checkout",
  • "payment_details": {
    },
  • "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": [
    ],
  • "authorization_id": "bd04c959-d159-49b4-a096-2d84e014a8da"
}

Cancellations

Create an cancellation

Create a cancellation for an order

scopes:

  • admin:shopping
  • write:shopping

An cancellation event will be added to the order

path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

order_id
required
string

The resource identifier string

Request Body schema: application/json
required

order cancellation

required
Array of objects

Selected items from the order

processed_at
string <date-time>

The date and time when the payment operation was processed by payment gateway

processed_by
string

The gateway the processed the payment operation

object
metadata
object

Additional details about the operation

success
boolean

The result from the operation.

authorization_id
string <= 40 characters

The authorization for this operation. Only included if the order was created with multiple_authorizations option enabled

Responses

Request samples

Content type
application/json
{
  • "items": [
    ],
  • "processed_at": "2019-08-24T14:15:22Z",
  • "processed_by": "dintero-checkout",
  • "payment_details": {
    },
  • "metadata": { },
  • "success": true,
  • "authorization_id": "bd04c959-d159-49b4-a096-2d84e014a8da"
}

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "processed_at": "2019-08-24T14:15:22Z",
  • "processed_by": "dintero-checkout",
  • "payment_details": {
    },
  • "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": [
    ],
  • "authorization_id": "bd04c959-d159-49b4-a096-2d84e014a8da"
}

Get Cancellation details

Retrieve details about a cancellation

scopes:

  • admin:shopping
  • read:shopping
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

order_id
required
string

The resource identifier string

cancellation_id
required
string <uuid>

The resource identifier string

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "processed_at": "2019-08-24T14:15:22Z",
  • "processed_by": "dintero-checkout",
  • "payment_details": {
    },
  • "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": [
    ],
  • "authorization_id": "bd04c959-d159-49b4-a096-2d84e014a8da"
}

Collections

Draft orders collection

Retrieve a list of draft orders

scopes:

  • admin:shopping
  • read:shopping
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

query Parameters
starting_after
string <uuid>

cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.

limit
integer [ 1 .. 100 ]
Default: 10

A limit on the number of objects to be returned. Limit can range between 1 and 100 items, and the default is 10 items.

customer_id
string

The resource identifier string

status
Array of strings
Items Enum: "open" "completed" "deleted"

filter by draft order status

created_at.gte
string <date>

filter by created_at, greater than or equal (after)

created_at.lte
string <date>

filter by created_at, less than or equal (before)

net_amount.gte
integer >= 0

Lower limit for filtering on order net_amount.

net_amount.lte
integer >= 0

Upper limit for filtering on order net_amount.

currency
Array of strings <iso-4217> [ items <iso-4217 > ]

Filter on order currency (3-letter currency code)

search
string

Will try to match the search to either order_id, external_ids or customer phone_number, email, name or customer_id.

Responses

Response samples

Content type
application/json
{
  • "draft_orders": [
    ]
}

Orders collection

Retrieve a list of orders

scopes:

  • admin:shopping
  • read:shopping
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

query Parameters
starting_after
string <uuid>

cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.

limit
integer [ 1 .. 100 ]
Default: 10

A limit on the number of objects to be returned. Limit can range between 1 and 100 items, and the default is 10 items.

status
Array of strings
Items Enum: "open" "closed" "cancelled"

filter by order status

payment_status
Array of strings
Items Enum: "pending" "partially_paid" "paid" "partially_refunded" "refunded"

filter by payment status

created_at.gte
string <date>

filter by created_at, greater than or equal (after)

created_at.lte
string <date>

filter by created_at, less than or equal (before)

include_events
Array of strings
Default: "false"
Items Enum: "false" "true" "api-event" "service-event"

include order events in response

card_brand
Array of strings

Filter on payment details, the card brand for payment

card_number
Array of strings <\s{4}> [ items <\s{4} > ]

Filter on payment details, the last 4 numbers for the card

psp
Array of strings

Filter on payment details, psp

payment_product
Array of strings

Filter on payment details, payment product

payment_product_type
Array of strings

Filter on payment details, payment product type

net_amount.gte
integer >= 0

Lower limit for filtering on order net_amount.

net_amount.lte
integer >= 0

Upper limit for filtering on order net_amount.

currency
Array of strings <iso-4217> [ items <iso-4217 > ]

Filter on order currency (3-letter currency code)

search
string

Will try to match the search to either order_id, external_ids or customer phone_number, email, name or customer_id.

itinerary_travel_mode
Array of strings (ItineraryTravelMode)
Items Enum: "BUS" "CAR" "FERRY" "METRO" "TAXI" "TRAIN" "TRAM" "WALK" "WAIT" "CUSTOM"
itinerary_arrival_address
string
itinerary_departure_address
string
items_discount_lines_discount_type
Array of strings (DiscountType)
Items Enum: "customer" "periodic" "manual" "loyalty" "total" "employee" "external"

Responses

Response samples

Content type
application/json
{
  • "orders": [
    ]
}

Get Authorization Collection

Retrieve list of authorizations for an order

scopes:

  • admin:shopping
  • read:shopping
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

order_id
required
string

The resource identifier string

Responses

Response samples

Content type
application/json
{
  • "authorizations": [
    ]
}

Get Cancellation Collection

Retrieve list of cancellations for an order

scopes:

  • admin:shopping
  • read:shopping
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

order_id
required
string

The resource identifier string

Responses

Response samples

Content type
application/json
{
  • "cancellations": [
    ]
}

Get Capture Collection

Retrieve list of captures for an order

scopes:

  • admin:shopping
  • read:shopping
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

order_id
required
string

The resource identifier string

Responses

Response samples

Content type
application/json
{
  • "captures": [
    ]
}

Order events collection

Retrieve a list of latest order events

scopes:

  • admin:shopping
  • read:shopping
  • read:shopping:/orders/ANY/events
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

order_id
required
string

The resource identifier string

Responses

Response samples

Content type
application/json
{
  • "state": "string",
  • "events": [
    ]
}

Get Refunds Collection

Retrieve list of refunds for an order

scopes:

  • admin:shopping
  • read:shopping
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

order_id
required
string

The resource identifier string

Responses

Response samples

Content type
application/json
{
  • "refunds": [
    ]
}

Get Session Collection

Retrieve list of sessions for an order

scopes:

  • admin:shopping
  • read:shopping
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

order_id
required
string

The resource identifier string

Responses

Response samples

Content type
application/json
{
  • "sessions": [
    ]
}

Customer

Orders collection

Retrieve a list of orders belonging to a customer user

scopes:

  • user:shopping
  • admin:shopping
  • read:shopping
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

customer_id
required
string

The resource identifier string

query Parameters
starting_after
string <uuid>

cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.

limit
integer [ 1 .. 100 ]
Default: 10

A limit on the number of objects to be returned. Limit can range between 1 and 100 items, and the default is 10 items.

status
Array of strings
Items Enum: "open" "closed" "cancelled"

filter by order status

payment_status
Array of strings
Items Enum: "pending" "partially_paid" "paid" "partially_refunded" "refunded"

filter by payment status

created_at.gte
string <date>

filter by created_at, greater than or equal (after)

created_at.lte
string <date>

filter by created_at, less than or equal (before)

include_events
Array of strings
Default: "false"
Items Enum: "false" "true" "service-event"

include order events in response

Responses

Response samples

Content type
application/json
{
  • "orders": [
    ]
}

Get Order

Retrieve Order details for an customer

scopes:

  • user:shopping
  • admin:shopping
  • read:shopping
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

customer_id
required
string

The resource identifier string

order_id
required
string

The resource identifier string

query Parameters
include_events
Array of strings
Default: "false"
Items Enum: "false" "true" "service-event"

include order events in response

Responses

Response samples

Content type
application/json
{
  • "id": "bd04c959-d159-49b4-a096-2d84e014a8da",
  • "created_at": "2019-08-24T14:15:22Z",
  • "created_by": "bd04c959-d159-49b4-a096-2d84e014a8da",
  • "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": {
    },
  • "gross_amount": 59800,
  • "net_amount": 47840,
  • "total_discount": 23130,
  • "total_manual_discount_amount": 0,
  • "shipping_address": {
    },
  • "billing_address": {
    },
  • "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": [
    ],
  • "external_ids": [
    ],
  • "items": [
    ],
  • "version": 0,
  • "type": "delivery",
  • "order_number": "order123456",
  • "currency": "NOK",
  • "order_id": "string",
  • "time_to_live_expires_at": "string",
  • "multiple_authorizations": true,
  • "payment_details": {
    },
  • "sessions": [
    ],
  • "authorizations": [
    ],
  • "captures": [
    ],
  • "refunds": [
    ],
  • "cancellations": [
    ],
  • "discounts": [
    ],
  • "store": {
    },
  • "external_links": [],
  • "attachments": [
    ],
  • "comments": [
    ],
  • "delivery_id": "string",
  • "_links": [
    ],
  • "state": "string",
  • "events": [
    ]
}

Store

Orders collection

Retrieve a list of orders belonging to a store

scopes:

  • admin:shopping
  • read:shopping
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

store_id
required
string

The resource identifier string

query Parameters
starting_after
string <uuid>

cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.

limit
integer [ 1 .. 100 ]
Default: 10

A limit on the number of objects to be returned. Limit can range between 1 and 100 items, and the default is 10 items.

status
Array of strings
Items Enum: "open" "closed" "cancelled"

filter by order status

payment_status
Array of strings
Items Enum: "pending" "partially_paid" "paid" "partially_refunded" "refunded"

filter by payment status

created_at.gte
string <date>

filter by created_at, greater than or equal (after)

created_at.lte
string <date>

filter by created_at, less than or equal (before)

include_events
Array of strings
Default: "false"
Items Enum: "false" "true" "service-event"

include order events in response

Responses

Response samples

Content type
application/json
{
  • "orders": [
    ]
}

Get Order

Retrieve Order details belonging to a store

scopes:

  • admin:shopping
  • read:shopping
path Parameters
aid
required
string <^[PT]{1}\d{8}$> = 9 characters

An id that uniquely identifies the account.

store_id
required
string

The resource identifier string

order_id
required
string

The resource identifier string

query Parameters
include_events
Array of strings
Default: "false"
Items Enum: "false" "true" "service-event"

include order events in response

Responses

Response samples

Content type
application/json
{
  • "id": "bd04c959-d159-49b4-a096-2d84e014a8da",
  • "created_at": "2019-08-24T14:15:22Z",
  • "created_by": "bd04c959-d159-49b4-a096-2d84e014a8da",
  • "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": {
    },
  • "gross_amount": 59800,
  • "net_amount": 47840,
  • "total_discount": 23130,
  • "total_manual_discount_amount": 0,
  • "shipping_address": {
    },
  • "billing_address": {
    },
  • "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": [
    ],
  • "external_ids": [
    ],
  • "items": [
    ],
  • "version": 0,
  • "type": "delivery",
  • "order_number": "order123456",
  • "currency": "NOK",
  • "order_id": "string",
  • "time_to_live_expires_at": "string",
  • "multiple_authorizations": true,
  • "payment_details": {
    },
  • "sessions": [
    ],
  • "authorizations": [
    ],
  • "captures": [
    ],
  • "refunds": [
    ],
  • "cancellations": [
    ],
  • "discounts": [
    ],
  • "store": {
    },
  • "external_links": [],
  • "attachments": [
    ],
  • "comments": [
    ],
  • "delivery_id": "string",
  • "_links": [
    ],
  • "state": "string",
  • "events": [
    ]
}