Conventions

How HTTP methods, filters, pagination, includes and response shapes are used across every BOCP endpoint.

HTTP methods

MethodPurposeNotes
GETRead dataNever modifies state. Safe to retry.
POSTCreate a new resourceAdd a product, attach an image, issue a document, etc.
PATCHPartial updateSend only the fields you want to change. Related fields (e.g. price + currency) must be sent together.
PUTReplaceUsed for a small number of endpoints (e.g. image from URL).
DELETEDeleteApplies immediately. Not always fully reversible.
Write operations are real and immediate. Daily backups exist, but restoring from backup loses everything committed since the backup ran. Use a test account for integration work.

URL structure

https://secure.bocp.eu/app/rest/v1/2/module/sub_action/filter1:value1/filter2:value2/

Filter order does not matter. Filters are always key:value pairs separated by /. There are no query strings on list endpoints.

Standard filters (list endpoints)

Every list endpoint accepts the following filters. Endpoint-specific filters are documented on each endpoint page.

FilterExampleMeaning
yearyear:2024Documents with a date in the full calendar year.
yearmonthyearmonth:202407Documents in a specific month.
yearmonthdayyearmonthday:20240715Documents on a specific day.
datedate:2024-07-15Alias of yearmonthday, accepts ISO date.
modifiedaftermodifiedafter:2024-07-15%2012:00:00Documents modified strictly after this timestamp. Use for incremental sync.
modifiedthroughmodifiedthrough:2024-07-15%2023:59:59Documents modified up to and including this timestamp.
idid:1234Return only the document with this BOCP ID.
minidminid:1234Documents with BOCP ID ≥ this value.
skipcancelledskipcancelled:1Exclude cancelled / deleted documents.
documentnrdocumentnr:INV-2024-0042Match a specific document number (supported on some endpoints).
pagepage:3Pagination. If missing, defaults to page 1.

Include / exclude

Some endpoints let you opt in to heavier or opt out of default data:

.../sales/list/include:items,transactions/exclude:invoiced/

Multiple values are comma-separated. Each endpoint lists the values it accepts.

Pagination

Every list endpoint returns at most 250 rows per page (this value is optimised by BOCP and may change). Two fields tell you whether more data exists:

{
  "page": 1,
  "has_more_pages": true
}

Ask for the next page with page:2. When you request a page that has no results, the server returns 404.

Response envelope

Every response — success or error — has the same shape:

{
  "is_error": false,
  "http_code": 200,
  "data": ...,
  "messages": ["Human-readable notes go here."],
  "request_route": "...",
  "your_ip": "1.2.3.4",
  "your_user": "api_user_xyz",
  "your_method": "GET"
}

Rate limiting

Please be a good citizen:


» Continue to Errors.