Out of Home Checkout API (1.0.0)

Download OpenAPI specification:

API for external parters such as CRM or purchasing systems, allowing order creation for specific customers.

Authorize by passing an authorization header like this:

"Authorization: Basic base64_encode(your_username + ":" + your_password)"

On place order Webhook

Gets called right after an order is placed by the API.

Authentication might not be needed depending on the case.

Authorizations:
basicAuth
Request Body schema: application/json

Response with the placed order

object (Order)

Responses

Request samples

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

On shipment sent Webhook

Gets called right after an order is shipped

Authentication might not be needed depending on the case.

Authorizations:
basicAuth
Request Body schema: application/json

Response with the shipped order

object (Order)

Responses

Request samples

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

Customer

List available customers

List all customers in the price groups authorized to the API key.

Authorizations:
basicAuth
query Parameters
limit
integer <= 100
Default: 20
page
integer >= 1
Default: 1

Responses

Response samples

Content type
application/json
{
  • "totalCount": 1,
  • "items": [
    ]
}

Customer by ID

Show customer by ID

Authorizations:
basicAuth
path Parameters
required
integer or string

Outofhome internal Customer ID or GLN

Responses

Response samples

Content type
application/json
{
  • "id": 5207,
  • "email": "test@example.com",
  • "firstname": "Kalle",
  • "lastname": "Anka",
  • "org_no": "1234567",
  • "company": "Out of Home",
  • "has_alcohol_license": false,
  • "group": "70",
  • "default_address": {
    },
  • "addresses": [
    ]
}

Lookup customer

Lookup customer by email

Authorizations:
basicAuth
query Parameters
email
required
string

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "firstname": "string",
  • "lastname": "string",
  • "company": "string",
  • "org_no": "string",
  • "email": "string",
  • "has_alcohol_license": true,
  • "group": "string",
  • "default_address": {
    },
  • "addresses": [
    ]
}

Cart

Show cart content

Show cart summary and items

Authorizations:
basicAuth
path Parameters
required
integer or string

Outofhome internal Customer ID or GLN

Responses

Response samples

Content type
application/json
{
  • "summary": {
    },
  • "items": [
    ]
}

Add to cart

Add products to a specific customers cart. The customer will then be prompted to log in and confirm the order. This endpoint is meant for CRM systems that are not allowed to place orders directly.

The optional force=1 query parameter allows adding products that are currently out of stock, but only if the product's stock item allows backorders. It only bypasses error code 2000. Other validation errors, such as unavailable quantity (2002), still apply.

Authorizations:
basicAuth
path Parameters
required
integer or string

Outofhome internal Customer ID or GLN

query Parameters
force
integer
Default: 0
Enum: 0 1

Set to 1 to allow adding products that are currently out of stock if the product's stock item allows backorders. This only bypasses error code 2000.

Request Body schema: application/json
required

Cart items

Array
sku
required
string

SKU of the item to add to cart, will be provided by Out of Home.

qty
required
integer

Quantity of the item to add to cart.

Responses

Request samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Response samples

Content type
application/json
{
  • "summary": {
    },
  • "items": [
    ]
}

Delete all

Remove all items from cart

Authorizations:
basicAuth
path Parameters
required
integer or string

Outofhome internal Customer ID or GLN

Responses

Response samples

Content type
application/json
{
  • "summary": {
    },
  • "items": [ ]
}

Change qty of cart item

Change quantity of cart item by SKU

Authorizations:
basicAuth
path Parameters
required
integer or string

Outofhome internal Customer ID or GLN

sku
required
string
Request Body schema: application/json
required

Quantity

qty
integer

Responses

Request samples

Content type
application/json
{
  • "qty": 6
}

Response samples

Content type
application/json
{
  • "summary": {
    },
  • "items": [
    ]
}

Remove item

Remove item from cart by SKU

Authorizations:
basicAuth
path Parameters
required
integer or string

Outofhome internal Customer ID or GLN

sku
required
string

Responses

Response samples

Content type
application/json
{
  • "summary": {
    },
  • "items": [
    ]
}

Orders

Get all orders.

Get all orders for customer, limited to orders placed by client.

Authorizations:
basicAuth
path Parameters
required
integer or string

Outofhome internal Customer ID or GLN

query Parameters
limit
integer <= 100
Default: 20
page
integer >= 1
Default: 1

Responses

Response samples

Content type
application/json
Example
{
  • "id": "G-12345",
  • "status": "processing",
  • "items": [
    ],
  • "tracking": [ ]
}

Create a new order

Creates a new order from the supplied information. It will return a 401 if unauthorized for specific customer.

The order endpoints are only available for procurement systems. Other clients may only be able to use our cart endpoints.

Additional error types can be added in the future depending on the type of products which are included in the order. The parameter "force" is needed if the order has items that are currently out of stock.

0 = default, will not place order if items are out of stock.

1 = Allow backorders, this will allow the order to be placed and shipped when all items are in stock for complete shipment.

2 = Remove items that are out of stock and automatically adjusted to stock quantity.

Authorizations:
basicAuth
path Parameters
required
integer or string

Outofhome internal Customer ID or GLN

query Parameters
force
integer
Default: 0

Flag to force how to handle products out-of-stock.

0 = default

1 = allow backorders

2 = remove items that are out of stock and adjust to stock quantity

Request Body schema: application/json
required

Order data

required
Array of objects or objects (OrderItem) non-empty
object or undefined (OrderRecipientAddress)

This address will override the recipient customers default address

object or null

Responses

Request samples

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

Response samples

Content type
application/json
Example
{
  • "id": "G-12345",
  • "status": "processing",
  • "estimated_delivery_date": "2022-06-08",
  • "created_at": "2022-06-02",
  • "grand_total": 2524,
  • "sub_total": 2005,
  • "shipping_amount": 110,
  • "items": [
    ],
  • "tracking": [ ]
}

Show order status

Shows the current status for the order, and tracking information if the order has it.

Tracking will be provided depending on the agreed upon shipping method.

Authorizations:
basicAuth
path Parameters
required
integer or string

Outofhome internal Customer ID or GLN

order_id
required
string

Responses

Response samples

Content type
application/json
Example
{
  • "id": "G-12345",
  • "status": "processing",
  • "created_at": "2022-06-02",
  • "grand_total": 2524,
  • "sub_total": 2005,
  • "shipping_amount": 110,
  • "items": [
    ],
  • "tracking": [ ]
}

Products

List available products

This endpoint lists products based on authorized price groups.

Authorizations:
basicAuth
query Parameters
limit
integer <= 500
Default: 20
page
integer >= 1
Default: 1
search_term
string

Search query (NOT IMPLEMENTED YET)

supplier
string

For filtering on specific supplier name

price_group
string

For filtering on specific price group

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Show product information

Shows information for a particular product

Authorizations:
basicAuth
path Parameters
sku
required
string

Responses

Response samples

Content type
application/json
{
  • "sku": "122419",
  • "name": "ICE Coffee Latte Macchiato",
  • "presentation_name": "ICE Coffee Latte Macchiato, Löfbergs - 12x230ml",
  • "brand": "Löfbergs",
  • "supplier_name": "Löfbergs Lila AB",
  • "enabled": true,
  • "stock": {
    },
  • "supplier_sku": "10517",
  • "sales_unit_quantity": 12,
  • "sales_unit_value": 230,
  • "sales_unit_measure_name": "ml",
  • "sales_unit_description": "12x230ml",
  • "sales_unit_weight": 3.1,
  • "sales_unit_name": "FP",
  • "pcs_per_box": 12,
  • "boxes_per_pallet": 168,
  • "categories": [
    ],
  • "product_type": "Iskaffe",
  • "requires_alcohol_license": false,
  • "prices": [
    ],
  • "invoiced_by_weight": false,
  • "gtin_pcs": "7310050005171",
  • "gtin_box": "07310050105178",
  • "gtin_pallet": "07310050905174",
  • "campaign_text": "Bäst före 1970-01-01",
  • "bookable_deal": false,
  • "lables": [
    ],
  • "description": "<p>Iskaffet ICE Latte Macchiato &auml;r en mj&ouml;lkdryck med kaffe som &auml;r gjord p&aring; naturliga och ekologiskt producerade r&aring;varor.</p>",
}