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)"
Gets called right after an order is placed by the API.
Authentication might not be needed depending on the case.
Response with the placed order
object (Order) |
{- "order": {
- "items": [
- {
- "sku": "string",
- "gtin": "string",
- "qty": 0
}
], - "address": {
- "company": "string",
- "firstname": "string",
- "lastname": "string",
- "street": "string",
- "delivery_preferences": "string",
- "postcode": "string",
- "city": "string",
- "telephone": "string",
- "country_id": "SE"
}, - "additional": {
- "reference": "string",
- "preferred_delivery_date": "string",
- "preferred_delivery_time_window": "string"
}
}
}Gets called right after an order is shipped
Authentication might not be needed depending on the case.
Response with the shipped order
object (Order) |
{- "order": {
- "items": [
- {
- "sku": "string",
- "gtin": "string",
- "qty": 0
}
], - "address": {
- "company": "string",
- "firstname": "string",
- "lastname": "string",
- "street": "string",
- "delivery_preferences": "string",
- "postcode": "string",
- "city": "string",
- "telephone": "string",
- "country_id": "SE"
}, - "additional": {
- "reference": "string",
- "preferred_delivery_date": "string",
- "preferred_delivery_time_window": "string"
}
}
}List all customers in the price groups authorized to the API key.
| limit | integer <= 100 Default: 20 |
| page | integer >= 1 Default: 1 |
{- "totalCount": 1,
- "items": [
- {
- "id": 5207,
- "email": "test@example.com",
- "firstname": "Kalle",
- "lastname": "Anka",
- "company": "Out of Home",
- "org_no": "1234567",
- "has_alcohol_license": false,
- "group": "70",
- "default_address": {
- "email": "test@example.com",
- "telephone": "0123456789",
- "company": "Out of Home",
- "firstname": "Kalle",
- "lastname": "Anka",
- "street": "Paradisäppelvägen 111",
- "delivery_preferences": "Our port code is XXXX",
- "postcode": "12345",
- "city": "Ankeborg",
- "country_id": "SE"
}, - "addresses": [
- {
- "email": "test@example.com",
- "telephone": "0123456789",
- "company": "Out of Home",
- "firstname": "Kalle",
- "lastname": "Anka",
- "street": "Paradisäppelvägen 111",
- "delivery_preferences": "Our port code is XXXX",
- "postcode": "12345",
- "city": "Ankeborg",
- "country_id": "SE"
}
]
}
]
}Show customer by ID
required | integer or string Outofhome internal Customer ID or GLN |
{- "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": {
- "firstname": "Kalle",
- "lastname": "Anka",
- "email": "test@example.com",
- "telephone": "0123456789",
- "street": "Paradisäppelvägen 111",
- "delivery_preferences": "Our port code is XXXX",
- "postcode": "12345",
- "company": "Out of Home",
- "city": "Ankeborg",
- "country_id": "SE"
}, - "addresses": [
- {
- "firstname": "Kalle",
- "lastname": "Anka",
- "email": "test@example.com",
- "telephone": "0123456789",
- "street": "Paradisäppelvägen 111",
- "delivery_preferences": "Our port code is XXXX",
- "postcode": "12345",
- "city": "Ankeborg",
- "country_id": "SE"
}
]
}Lookup customer by email
| email required | string |
{- "id": 0,
- "firstname": "string",
- "lastname": "string",
- "company": "string",
- "org_no": "string",
- "email": "string",
- "has_alcohol_license": true,
- "group": "string",
- "default_address": {
- "email": "string",
- "company": "string",
- "firstname": "string",
- "lastname": "string",
- "street": "string",
- "delivery_preferences": "string",
- "postcode": "string",
- "city": "string",
- "telephone": "string",
- "country_id": "string",
- "delivery_days": [
- {
- "day": "mon",
- "break_time": "string",
- "days_before": 0
}
]
}, - "addresses": [
- {
- "email": "string",
- "company": "string",
- "firstname": "string",
- "lastname": "string",
- "street": "string",
- "delivery_preferences": "string",
- "postcode": "string",
- "city": "string",
- "telephone": "string",
- "country_id": "string",
- "delivery_days": [
- {
- "day": "mon",
- "break_time": "string",
- "days_before": 0
}
]
}
]
}Show cart summary and items
required | integer or string Outofhome internal Customer ID or GLN |
{- "summary": {
- "total": 520,
- "delivery_time": {
- "monday": 2,
- "tuesday": 1,
- "wednesday": 7,
- "thursday": 6,
- "friday": 5,
- "saturday": 4,
- "sunday": 3
}
}, - "items": [
- {
- "qty": 5,
- "product": {
- "sku": "ABC123",
- "name": "Test product",
- "enabled": true,
- "stock": {
- "qty": 150,
- "backorders": false
}
}
}
]
}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.
required | integer or string Outofhome internal Customer ID or GLN |
| force | integer Default: 0 Enum: 0 1 Set to |
Cart items
| 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. |
[- {
- "sku": "ABC123",
- "qty": 6
}, - {
- "sku": "DEF456",
- "qty": 2
}
]{- "summary": {
- "total": 520
}, - "items": [
- {
- "qty": 6,
- "product": {
- "sku": "ABC123",
- "name": "Test product",
- "enabled": true,
- "stock": {
- "qty": 150,
- "backorders": false
}
}
}, - {
- "qty": 2,
- "product": {
- "sku": "DEF456",
- "name": "Test product 2",
- "enabled": true,
- "stock": {
- "qty": 123,
- "backorders": false
}
}
}
]
}Change quantity of cart item by SKU
required | integer or string Outofhome internal Customer ID or GLN |
| sku required | string |
Quantity
| qty | integer |
{- "qty": 6
}{- "summary": {
- "total": 520
}, - "items": [
- {
- "qty": 5,
- "product": {
- "sku": "ABC123",
- "name": "Test product",
- "enabled": true,
- "stock": {
- "qty": 150,
- "backorders": false
}
}
}
]
}Remove item from cart by SKU
required | integer or string Outofhome internal Customer ID or GLN |
| sku required | string |
{- "summary": {
- "total": 520
}, - "items": [
- {
- "qty": 5,
- "product": {
- "sku": "ABC123",
- "name": "Test product",
- "enabled": true,
- "stock": {
- "qty": 150,
- "backorders": false
}
}
}
]
}Get all orders for customer, limited to orders placed by client.
required | integer or string Outofhome internal Customer ID or GLN |
| limit | integer <= 100 Default: 20 |
| page | integer >= 1 Default: 1 |
{- "id": "G-12345",
- "status": "processing",
- "items": [
- {
- "sku": "ABC123",
- "qty": 1
}, - {
- "sku": "Test",
- "qty": 2
}
], - "tracking": [ ]
}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.
required | integer or string Outofhome internal Customer ID or GLN |
| 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 |
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 |
{- "items": [
- {
- "sku": "ABC123",
- "qty": 1
}, - {
- "sku": "Test",
- "qty": 2
}
]
}{- "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": [
- {
- "sku": "ABC123",
- "qty": 1
}, - {
- "sku": "Test",
- "qty": 2
}
], - "tracking": [ ]
}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.
required | integer or string Outofhome internal Customer ID or GLN |
| order_id required | string |
{- "id": "G-12345",
- "status": "processing",
- "created_at": "2022-06-02",
- "grand_total": 2524,
- "sub_total": 2005,
- "shipping_amount": 110,
- "items": [
- {
- "sku": "ABC123",
- "qty": 1
}, - {
- "sku": "Test",
- "qty": 2
}
], - "tracking": [ ]
}This endpoint lists products based on authorized price groups.
| 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 |
[- {
- "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": {
- "qty": 15,
- "backorders": true
}, - "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": [
- "Kalla Drycker"
], - "product_type": "Iskaffe",
- "requires_alcohol_license": false,
- "prices": [
- {
- "id": 73,
- "price": 141.8
}
], - "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": [
- "Svanen",
- "Kampanj"
], - "description": "<p>Iskaffet ICE Latte Macchiato är en mjölkdryck med kaffe som är gjord på naturliga och ekologiskt producerade råvaror.</p>",
}
]Shows information for a particular product
| sku required | string |
{- "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": {
- "qty": 15,
- "backorders": true
}, - "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": [
- "Kalla Drycker"
], - "product_type": "Iskaffe",
- "requires_alcohol_license": false,
- "prices": [
- {
- "id": 73,
- "price": 141.8
}
], - "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": [
- "Svanen",
- "Kampanj"
], - "description": "<p>Iskaffet ICE Latte Macchiato är en mjölkdryck med kaffe som är gjord på naturliga och ekologiskt producerade råvaror.</p>",
}