OBS Public API (1.2.2)

Download OpenAPI specification:

Public WordPress API Endpoints by OBS

The authentication is realized with an additional WordPress user that has a specific user role, only allowing it to access certain endpoints, no other WordPress access (you need the matching OBS plugin to provide that user role). To authenticate with the API, you need to create an Application Password for that user as username/password is not allowed for WordPress API access. Use the username and Application Password with BasicAuth

Orders

Get all order numbers of the last 30 days of order

Get all order numbers of the last 30 days of orders that were already transferred to the middleware (done every 2 minutes).

Authorizations:
BasicAuth
query Parameters
newer_than
string <date-time>

Filter the orders (of the last 30 days) to be newer than the passed ISO 8601 / RFC 3339 timestamp

Responses

Response samples

Content type
application/json
[
  • "1698243392.125004871",
  • "1697624864.125008737",
  • "1697549911.125007887"
]

Get the order details for an order number

Only returns orders with status = 2

Authorizations:
BasicAuth
path Parameters
order_number
required
string (Order_Number) [0-9]{10}\.[0-9]{8,9}
Example: 1639331260.125003824

(Required) The order number

Responses

Response samples

Content type
application/json
{
  • "order_number": "1697624864.125008737",
  • "shop_id": 125,
  • "erp_order_number": "",
  • "status": 1,
  • "type": 0,
  • "products": [
    ],
  • "customer_data": {
    },
  • "shipping": {
    },
  • "payment": {
    },
  • "price": {
    },
  • "erp_customer_id": 0,
  • "customer_id": "",
  • "zip": "12345",
  • "order_created": "2021-12-12 19:52:03",
  • "shipping_handler_details": [
    ]
}

Update the value of the shipping handler details field of an order

Replaces the current value, to add details, first get the current value

Authorizations:
BasicAuth
path Parameters
order_number
required
string (Order_Number) [0-9]{10}\.[0-9]{8,9}
Example: 1639331260.125003824

(Required) The order number

Request Body schema: application/json
Array of objects (Shipping_Handler_Details)
Array
name
required
string

Name of the delivery company/ delivery type

description
string

Description of the delivery company/ delivery type

tracking_number
string

Tracking code that can be used to track this delivery

tracking_url
string

Tracking URL that can be used to track this delivery

product_ids
required
Array of strings

The product IDs this shipping/ delivery is used for

object non-empty

Per product_id, the amount of the product. Optional, but must not be empty if present

timestamp_change
string
expected_delivery
string

Responses

Request samples

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

Append one set of shipping handler details to the order's shipping handler details

Retrieves the shipping handler details of the order, adds the new set to it, and saves it back to the database.

Authorizations:
BasicAuth
path Parameters
order_number
required
string (Order_Number) [0-9]{10}\.[0-9]{8,9}
Example: 1639331260.125003824

(Required) The order number

Request Body schema: application/json
object (Shipping_Handler_Details)

Real shipping/ delivery details entered by ERP or external: Tracking data, parcel info, etc. Empty when order created

name
required
string

Name of the delivery company/ delivery type

description
string

Description of the delivery company/ delivery type

tracking_number
string

Tracking code that can be used to track this delivery

tracking_url
string

Tracking URL that can be used to track this delivery

product_ids
required
Array of strings

The product IDs this shipping/ delivery is used for

object non-empty

Per product_id, the amount of the product. Optional, but must not be empty if present

timestamp_change
string
expected_delivery
string

Responses

Request samples

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

Products

Get price and availability for spare-part products by MPN

Returns price, tax, stock and availability information for the requested MPNs of a single brand. Used to feed the SPF spare-parts catalogue. The response is keyed by MPN; MPNs without a matching product are omitted. At most 100 MPNs are processed per request.

Authorizations:
BasicAuth
Request Body schema: application/json
required
mpns
required
Array of strings [ 1 .. 100 ] items

The MPNs (manufacturer part numbers) of the products to look up. Duplicate values are ignored. At most 100 MPNs are processed per request.

brand
required
string non-empty

The brand the requested products belong to

Responses

Request samples

Content type
application/json
{
  • "mpns": [
    ],
  • "brand": "KTM"
}

Response samples

Content type
application/json
{
  • "93503001000": {
    },
  • "93505088000": {
    },
  • "61430018000": {
    }
}