Fortnox API

Download OpenAPI specification:Download

Documentation

The Fortnox API is organized around REST. This means that we’ve designed it to have resource-oriented URLs and be as predictable as possible for you as developer.

It also means that we use HTTP status codes when something goes wrong and HTTP verbs understod by many API clients around the web.

We use a modified version of OAuth2 for authentication to offer a secure way for both you and our users to interact.

The API is generally built to support both XML and JSON but in this documentation all the examples will be in JSON.

We encourage you to read all the articles in the Guides & Good to Know section first, before going forward and learning about the different resources.

This to ensure you get an understanding of some of the shared components of the API such as parameters and error handling.

Rate limits

The limit per access-token is 25 requests per 5 seconds. This equals to 300 requests per minute.

Read more about this here.

Query parameters

Use query parameters with the ?-character and separate parameters with the &-character.

Example: GET - https://api.fortnox.se/3/invoices?accountnumberfrom=3000&accountnumberto=4000 Read more about our parameters here

Search the documentation using the search field in the top left corner.

Custom Document Type

Handles types for custom documents.

A custom document is identified by its type and id. Each type belongs to a category, either INBOUND or OUTBOUND.

Note that custom document types are created automatically if necessary when you create custom documents.

The following referenceTypes are not allowed for custom document types. Variants of these containing dashes, underscores, lower case, upper case etc are not allowed either.

  • ARTICLEPRODUCTION
  • ARTIKELPRODUKTION
  • CUSTOMERINVOICE
  • CUSTOMERORDER
  • DELIVERYNOTE
  • FAKTURA
  • FÖLJESEDEL
  • INGÅENDESALDO
  • INKÖP
  • INKÖPSORDER
  • INVENTERING
  • INVENTORY
  • INVOICE
  • ITEMPRODUCTION
  • KREDITFAKTURA
  • KREDITORDER
  • KUNDFAKTURA
  • KUNDORDER
  • LAGERFLYTT
  • LEGACYINTEGRATIONIN
  • LEGACYINTEGRATIONOUT
  • LEVERANTÖRSFAKTURA
  • LEVFAKTURA
  • MANUALDELIVERY
  • MANUALINBOUND
  • MANUALINBOUNDDELIVERY
  • MANUALOUTBOUND
  • MANUALOUTBOUNDDELIVERY
  • MANUELLINLEVERANS
  • MANUELLLEVERANS
  • MANUELLUTLEVERANS
  • NEGATIVEOPENINGBALANCES
  • NEGATIVTINGÅENDESALDO
  • ORDER
  • PLOCKLISTA
  • POSITIVEOPENINGBALANCES
  • PRODUCTION
  • PRODUKTION
  • PURCHASE
  • PURCHASEORDER
  • STOCKTAKING
  • STOCKTAKINGDEVIATION
  • STOCKTRANSFER
  • SUPINVOICE
  • SUPPLIERINVOICE

List custom document types

Responses

Response samples

Content type
application/json
{
  • "category": "INBOUND",
  • "referenceType": "a"
}

Create custom document type

Create type, if it doesn't already exists. Note that new custom document types are created automatically when you create custom documents, so normally you do not need to call this method.

Throws HTTP 400 referenceTypeNotAllowed if the name of the type is not allowed.

Request Body schema: application/json

The CustomDocumentType.

category
required
string
Enum: "INBOUND" "OUTBOUND"
referenceType
required
string [ 1 .. 25 ] characters [a-zA-Z0-9_-]+

Responses

Request samples

Content type
application/json
{
  • "category": "INBOUND",
  • "referenceType": "a"
}

Response samples

Content type
application/json
0
0

Get custom document type

path Parameters
type
required
string

the name of the reference type

Responses

Response samples

Content type
application/json
{
  • "category": "INBOUND",
  • "referenceType": "a"
}

Custom Inbound Document

Handles Custom Inbound Documents.

A Custom Inbound Document is an externally created document for registering inbound deliveries to warehouse.

Get custom inbound document

path Parameters
type
required
string

Document type.

id
required
string

Document id.

Responses

Response samples

Content type
application/json
{
  • "currency": {
    },
  • "date": "2019-08-24",
  • "id": "^0",
  • "note": "string",
  • "rows": [
    ],
  • "type": "a",
  • "voided": true,
  • "warehouseReady": true
}

Save custom inbound document

path Parameters
type
required
string

min 1 character, max 25 characters, may contain letters A-Z, digits 0-9, underscore (_), and dash (-), type is case-insensitive

      Type is a custom name/reference of the document that will be used to reference the document type 
* If type is not known, it will be registered as belonging to the INBOUND category.
* If type is an existing custom document type of category OUTBOUND an error is thrown.
* If type is invalid an error is thrown.

id
required
string

min 1 character, max 25 characters, may only contain digits 0-9

Request Body schema: application/json

the CustomInboundDocument to create

object (warehouse_Currency)
date
required
string <date>
id
string [ 1 .. 25 ] characters ^[0-9]+
note
string <= 1000 characters
required
Array of objects (warehouse_CustomInboundDocumentRow)
type
string [ 1 .. 25 ] characters [a-zA-Z0-9_-]+
voided
boolean
warehouseReady
boolean

Responses

Request samples

Content type
application/json
{
  • "currency": {
    },
  • "date": "2019-08-24",
  • "id": "^0",
  • "note": "string",
  • "rows": [
    ],
  • "type": "a",
  • "voided": true,
  • "warehouseReady": true
}

Response samples

Content type
application/json
{
  • "currency": {
    },
  • "date": "2019-08-24",
  • "id": "^0",
  • "note": "string",
  • "rows": [
    ],
  • "type": "a",
  • "voided": true,
  • "warehouseReady": true
}

Release custom inbound document

The document will be locked and bookkept. The inbound deliveries will affect available stock.

path Parameters
type
required
string

document type

id
required
string

document id

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "id": "string",
  • "message": "string"
}

Void custom inbound document

Voiding a document will undo the possible stock changes that the document had made, note that the document and the transactions created are not deleted. Some limitations apply, see below.

path Parameters
type
required
string

document type

id
required
string

document id

query Parameters
force
boolean

true if the document should be voided even if the document has connected outbounds, defaults to false.

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "id": "string",
  • "message": "string"
}

Custom Outbound Document

Handles Custom Outbound Documents.

A Custom Outbound Document is an externally created document for registering outbound deliveries to warehouse.

Get custom outbound document

path Parameters
type
required
string

document type

id
required
string

document id

Responses

Response samples

Content type
application/json
{
  • "averageCosts": [
    ],
  • "date": "2019-08-24",
  • "deliveryState": "registration",
  • "forcedDelivery": true,
  • "id": "^0",
  • "note": "string",
  • "referenceType": "a",
  • "rows": [
    ],
  • "voided": true,
  • "warehouseReady": true
}

Save a custom outbound document


If type is not known, it will be registered as belonging to the OUTBOUND category.
If type is an existing custom document type of category INBOUND an error is thrown.
If type is invalid an error is thrown.
path Parameters
type
required
string

the type of the custom outbound document, min 1 character, max 25 characters, may contain letters A-Z, digits 0-9, underscore (_), and dash (-). Always stored as upper case.

id
required
string

the id of the custom outbound document, min 1 character, max 25 characters, may only contain digits 0-9

Request Body schema: application/json

the CustomOutboundDocument to create

Array of objects (warehouse_AverageCost)
date
required
string <date>
deliveryState
required
string
Enum: "registration" "reservation" "delivery"
forcedDelivery
boolean
id
string [ 1 .. 25 ] characters ^[0-9]+
note
string <= 1000 characters
referenceType
string [ 1 .. 25 ] characters [a-zA-Z0-9_-]+
required
Array of objects (warehouse_CustomOutboundDocumentRow)
voided
boolean
warehouseReady
boolean

Responses

Request samples

Content type
application/json
{
  • "averageCosts": [
    ],
  • "date": "2019-08-24",
  • "deliveryState": "registration",
  • "forcedDelivery": true,
  • "id": "^0",
  • "note": "string",
  • "referenceType": "a",
  • "rows": [
    ],
  • "voided": true,
  • "warehouseReady": true
}

Response samples

Content type
application/json
{
  • "averageCosts": [
    ],
  • "date": "2019-08-24",
  • "deliveryState": "registration",
  • "forcedDelivery": true,
  • "id": "^0",
  • "note": "string",
  • "referenceType": "a",
  • "rows": [
    ],
  • "voided": true,
  • "warehouseReady": true
}

Release custom outbound document

path Parameters
type
required
string

document type

id
required
string

document id

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "id": "string",
  • "message": "string"
}

Void custom outbound document

path Parameters
type
required
string

document type

id
required
string

document id

query Parameters
force
boolean

true if the document should be voided even if the document has connected outbounds, defaults to false.

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "id": "string",
  • "message": "string"
}

Incoming Goods

General resource for incoming goods.

List Incoming Goods Documents

List incoming goods documents matching the given parameters.

Sortable fields: id, has_delivery_note, delivery_note_id, supplier_number, date

query Parameters
released
boolean

true to include only released documents. false to include only non-released documents.

completed
boolean

true to include only completed documents. false to include only non-completed documents.

voided
boolean

true to include only voided documents. false to include only non-voided documents.

supplierNumber
string

Include only documents with the given supplierNumber.

itemId
string

Include only documents with the given itemId.

note
string

Include only documents where note-field contains the given text (case-insensitive).

deliveryNote
string

Include only documents where deliveryNote-field contains the given text (case-insensitive).

q
string

Include only documents where id or deliveryNote-field contains the given text (case-insensitive).

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create Incoming Goods document

Request Body schema: */*

The IncomingGoods document.

completed
boolean
costCenterCode
string
date
string <date>
deliveryNoteId
required
string [ 1 .. 50 ] characters
hasDeliveryNote
boolean
id
integer <int64>
note
string <= 1000 characters
projectId
string
released
boolean
Array of objects (warehouse_IncomingGoodsRow)
stockPointCode
string
stockPointId
string <uuid>
stockPointName
string
supplierName
string <= 1024 characters
supplierNumber
string <= 1024 characters
voided
boolean

Responses

Response samples

Content type
application/json
{
  • "completed": true,
  • "costCenterCode": "string",
  • "date": "2019-08-24",
  • "deliveryNoteId": "string",
  • "hasDeliveryNote": true,
  • "id": 0,
  • "note": "string",
  • "projectId": "string",
  • "released": true,
  • "rows": [
    ],
  • "stockPointCode": "string",
  • "stockPointId": "7dcf5601-6c82-49ce-8b36-2dd2c353c71c",
  • "stockPointName": "string",
  • "supplierName": "string",
  • "supplierNumber": "string",
  • "voided": true
}

Get Incoming Goods document

path Parameters
id
required
integer <int64>

Incoming goods document id.

query Parameters
ignoreSupplierInvoiceId
integer <int64>

This Supplier Invoice id will be excluded when calculating the takenQuantity.

Responses

Response samples

Content type
application/json
{
  • "completed": true,
  • "costCenterCode": "string",
  • "date": "2019-08-24",
  • "deliveryNoteId": "string",
  • "hasDeliveryNote": true,
  • "id": 0,
  • "note": "string",
  • "projectId": "string",
  • "released": true,
  • "rows": [
    ],
  • "stockPointCode": "string",
  • "stockPointId": "7dcf5601-6c82-49ce-8b36-2dd2c353c71c",
  • "stockPointName": "string",
  • "supplierName": "string",
  • "supplierNumber": "string",
  • "voided": true
}

Partial update Incoming Goods document

Perform a partial update of an IncomingGoods document. The partial update will update note, deliveryNoteId, supplierName and hasDeliveryNote It is possible to perform a partial update of a released/completed (TODO: ?) document.

path Parameters
id
required
integer <int64>

Incoming goods document id.

Request Body schema: */*

the incoming goods document to update. The partial update updates note, deliveryNoteId, supplierName and hasDeliveryNote

completed
boolean
costCenterCode
string
date
string <date>
deliveryNoteId
required
string [ 1 .. 50 ] characters
hasDeliveryNote
boolean
id
integer <int64>
note
string <= 1000 characters
projectId
string
released
boolean
Array of objects (warehouse_IncomingGoodsRow)
stockPointCode
string
stockPointId
string <uuid>
stockPointName
string
supplierName
string <= 1024 characters
supplierNumber
string <= 1024 characters
voided
boolean

Responses

Response samples

Content type
application/json
{
  • "completed": true,
  • "costCenterCode": "string",
  • "date": "2019-08-24",
  • "deliveryNoteId": "string",
  • "hasDeliveryNote": true,
  • "id": 0,
  • "note": "string",
  • "projectId": "string",
  • "released": true,
  • "rows": [
    ],
  • "stockPointCode": "string",
  • "stockPointId": "7dcf5601-6c82-49ce-8b36-2dd2c353c71c",
  • "stockPointName": "string",
  • "supplierName": "string",
  • "supplierNumber": "string",
  • "voided": true
}

Update Incoming Goods document

path Parameters
id
required
integer <int64>

Incoming goods document id.

Request Body schema: */*

The IncomingGoods document.

completed
boolean
costCenterCode
string
date
string <date>
deliveryNoteId
required
string [ 1 .. 50 ] characters
hasDeliveryNote
boolean
id
integer <int64>
note
string <= 1000 characters
projectId
string
released
boolean
Array of objects (warehouse_IncomingGoodsRow)
stockPointCode
string
stockPointId
string <uuid>
stockPointName
string
supplierName
string <= 1024 characters
supplierNumber
string <= 1024 characters
voided
boolean

Responses

Response samples

Content type
application/json
{
  • "completed": true,
  • "costCenterCode": "string",
  • "date": "2019-08-24",
  • "deliveryNoteId": "string",
  • "hasDeliveryNote": true,
  • "id": 0,
  • "note": "string",
  • "projectId": "string",
  • "released": true,
  • "rows": [
    ],
  • "stockPointCode": "string",
  • "stockPointId": "7dcf5601-6c82-49ce-8b36-2dd2c353c71c",
  • "stockPointName": "string",
  • "supplierName": "string",
  • "supplierNumber": "string",
  • "voided": true
}

Complete Incoming Goods document

Mark a released Incoming Goods document as Completed. Bookkeeping will be finalized. A Completed Incoming Goods document cannot be matched against any more Supplier Invoices.

path Parameters
id
required
integer <int64>

Incoming goods document id.

Request Body schema: */*

Date for bookkeeping in format "YYYY-MM-DD". Must be between document's release date (inclusive) and today's date (inclusive).

string

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "id": "string",
  • "message": "string"
}

Release Incoming Goods document

The document will be locked and bookkept. The inbound deliveries will affect available stock.

path Parameters
id
required
integer <int64>

Incoming goods document id.

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "id": "string",
  • "message": "string"
}

Void Incoming Goods document

Void a document. If an Incoming Goods document has been Completed, or matched against Supplier Invoice, it cannot be voided.

path Parameters
id
required
integer <int64>

Incoming goods document id.

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "id": "string",
  • "message": "string"
}

Manual Document

Handles listing of ManualDocuments.

There are three types of Manual Documents in Warehouse:

  • Manual Inbound Documents,
  • Manual Outbound Documents, and
  • Stock Transfer Documents

List manual documents

query Parameters
state
string
Enum: "all" "unreleased" "released" "voided"

Include only documents with given state.

type
string
Enum: "all" "inbound" "outbound" "stocktransfer"

Include only documents with given type.

itemId
string

Include only documents containing the given item.

Responses

Response samples

Content type
application/json
{
  • "date": "2019-08-24",
  • "deliveryId": 0,
  • "entityId": "string",
  • "note": "string",
  • "released": true,
  • "type": "Inbound",
  • "voided": true
}

Manual Inbound Document

Handles ManualInboundDocuments

Create manual inbound document

The id is set automatically.

Request Body schema: application/json

manual inbound document

currency
required
string = 3 characters
currencyRate
required
number >= 0.000001
currencyUnit
integer <int32> >= 1
date
required
string <date>
id
integer <int64>
note
string <= 1000 characters
released
boolean
required
Array of objects (warehouse_ManualInboundDocumentRow) [ 1 .. 2147483647 ] items
stockPointCode
string
stockPointId
string <uuid>
stockPointName
string
voided
boolean

Responses

Request samples

Content type
application/json
{
  • "currency": "str",
  • "currencyRate": 0.000001,
  • "currencyUnit": 1,
  • "date": "2019-08-24",
  • "id": 0,
  • "note": "string",
  • "released": true,
  • "rows": [
    ],
  • "stockPointCode": "string",
  • "stockPointId": "7dcf5601-6c82-49ce-8b36-2dd2c353c71c",
  • "stockPointName": "string",
  • "voided": true
}

Response samples

Content type
application/json
{
  • "currency": "str",
  • "currencyRate": 0.000001,
  • "currencyUnit": 1,
  • "date": "2019-08-24",
  • "id": 0,
  • "note": "string",
  • "released": true,
  • "rows": [
    ],
  • "stockPointCode": "string",
  • "stockPointId": "7dcf5601-6c82-49ce-8b36-2dd2c353c71c",
  • "stockPointName": "string",
  • "voided": true
}

Get manual inbound document

path Parameters
id
required
integer <int64>

Manual Inbound document id.

Responses

Response samples

Content type
application/json
{
  • "currency": "str",
  • "currencyRate": 0.000001,
  • "currencyUnit": 1,
  • "date": "2019-08-24",
  • "id": 0,
  • "note": "string",
  • "released": true,
  • "rows": [
    ],
  • "stockPointCode": "string",
  • "stockPointId": "7dcf5601-6c82-49ce-8b36-2dd2c353c71c",
  • "stockPointName": "string",
  • "voided": true
}

Update note on manual inbound document

When a Manual Inbound has been released, it is locked. The note field can still be updated using this endpoint.

path Parameters
id
required
integer <int64>

Manual Inbound document id.

Request Body schema: application/json

Note.

note
string <= 1000 characters

Responses

Request samples

Content type
application/json
{
  • "note": "string"
}

Response samples

Content type
application/json
{
  • "error": "string",
  • "id": "string",
  • "message": "string"
}

Update manual inbound document

path Parameters
id
required
integer <int64>

Manual Inbound document id.

Request Body schema: application/json

Manual Inbound document

currency
required
string = 3 characters
currencyRate
required
number >= 0.000001
currencyUnit
integer <int32> >= 1
date
required
string <date>
id
integer <int64>
note
string <= 1000 characters
released
boolean
required
Array of objects (warehouse_ManualInboundDocumentRow) [ 1 .. 2147483647 ] items
stockPointCode
string
stockPointId
string <uuid>
stockPointName
string
voided
boolean

Responses

Request samples

Content type
application/json
{
  • "currency": "str",
  • "currencyRate": 0.000001,
  • "currencyUnit": 1,
  • "date": "2019-08-24",
  • "id": 0,
  • "note": "string",
  • "released": true,
  • "rows": [
    ],
  • "stockPointCode": "string",
  • "stockPointId": "7dcf5601-6c82-49ce-8b36-2dd2c353c71c",
  • "stockPointName": "string",
  • "voided": true
}

Response samples

Content type
application/json
{
  • "currency": "str",
  • "currencyRate": 0.000001,
  • "currencyUnit": 1,
  • "date": "2019-08-24",
  • "id": 0,
  • "note": "string",
  • "released": true,
  • "rows": [
    ],
  • "stockPointCode": "string",
  • "stockPointId": "7dcf5601-6c82-49ce-8b36-2dd2c353c71c",
  • "stockPointName": "string",
  • "voided": true
}

Release manual inbound document

The document will be locked and bookkept.

The following error codes might be thrown:

cannot_release_later_than_current_date
Document date cannot be in the future.
document_is_voided
Document is voided.
period_locked
Document date is within a locked bookkeeping period.
path Parameters
id
required
integer <int64>

Manual Inbound document id.

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "id": "string",
  • "message": "string"
}

Void manual inbound document

A released manual inbound document might have connected outbounds, and can only be force voided. Note that a force void operation might cause a negative stock.

The following error codes might be thrown:

void_linked_outbound
If this document has any outbounds transactions connected to it.
path Parameters
id
required
integer <int64>

Manual Inbound document id.

query Parameters
force
boolean

true if we should force void, defaults to false

customVoidDate
string <date>

date the void operation should be bookkeept on

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "id": "string",
  • "message": "string"
}

Manual Outbound Document

Handles ManualOutboundDocuments

Create manual outbound document

The id is set automatically.

Request Body schema: application/json

manual outbound document

date
required
string <date>
id
integer <int64>
note
string <= 1000 characters
released
boolean
required
Array of objects (warehouse_ManualOutboundDocumentRow) <= 2147483647 items
stockPointCode
string
stockPointId
string <uuid>
stockPointName
string
voided
boolean

Responses

Request samples

Content type
application/json
{
  • "date": "2019-08-24",
  • "id": 0,
  • "note": "string",
  • "released": true,
  • "rows": [
    ],
  • "stockPointCode": "string",
  • "stockPointId": "7dcf5601-6c82-49ce-8b36-2dd2c353c71c",
  • "stockPointName": "string",
  • "voided": true
}

Response samples

Content type
application/json
{
  • "date": "2019-08-24",
  • "id": 0,
  • "note": "string",
  • "released": true,
  • "rows": [
    ],
  • "stockPointCode": "string",
  • "stockPointId": "7dcf5601-6c82-49ce-8b36-2dd2c353c71c",
  • "stockPointName": "string",
  • "voided": true
}

Get manual outbound document

path Parameters
id
required
integer <int64>

Manual Outbound document id.

Responses

Response samples

Content type
application/json
{
  • "date": "2019-08-24",
  • "id": 0,
  • "note": "string",
  • "released": true,
  • "rows": [
    ],
  • "stockPointCode": "string",
  • "stockPointId": "7dcf5601-6c82-49ce-8b36-2dd2c353c71c",
  • "stockPointName": "string",
  • "voided": true
}

Update note on manual outbound document

When a Manual Outbound has been released, it is locked. The note field can still be updated using this endpoint.

path Parameters
id
required
integer <int64>

Manual Outbound document id

Request Body schema: application/json

Note.

note
string <= 1000 characters

Responses

Request samples

Content type
application/json
{
  • "note": "string"
}

Response samples

Content type
application/json
{
  • "error": "string",
  • "id": "string",
  • "message": "string"
}

Update manual outbound document

HTTP code 400 cannot_modify_released_document HTTP code 400 document_is_voided Document is voided. HTTP code 404 not found

path Parameters
id
required
integer <int64>

Manual Outbound document id.

Request Body schema: application/json

Manual Outbound document.

date
required
string <date>
id
integer <int64>
note
string <= 1000 characters
released
boolean
required
Array of objects (warehouse_ManualOutboundDocumentRow) <= 2147483647 items
stockPointCode
string
stockPointId
string <uuid>
stockPointName
string
voided
boolean

Responses

Request samples

Content type
application/json
{
  • "date": "2019-08-24",
  • "id": 0,
  • "note": "string",
  • "released": true,
  • "rows": [
    ],
  • "stockPointCode": "string",
  • "stockPointId": "7dcf5601-6c82-49ce-8b36-2dd2c353c71c",
  • "stockPointName": "string",
  • "voided": true
}

Response samples

Content type
application/json
{
  • "date": "2019-08-24",
  • "id": 0,
  • "note": "string",
  • "released": true,
  • "rows": [
    ],
  • "stockPointCode": "string",
  • "stockPointId": "7dcf5601-6c82-49ce-8b36-2dd2c353c71c",
  • "stockPointName": "string",
  • "voided": true
}

Release manual outbound document

The document will be locked and bookkept.

The following error codes might be thrown:

cannot_release_later_than_current_date
Document date cannot be in the future.
document_is_voided
Document is voided.
period_locked
Document date is within a locked bookkeeping period.
path Parameters
id
required
integer <int64>

Manual Outbound document id.

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "id": "string",
  • "message": "string"
}

Void manual outbound document

path Parameters
id
required
integer <int64>

Manual Outbound document id.

query Parameters
customVoidDate
string <date>

if provided this date will be used as the voided date instead of the document date

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "id": "string",
  • "message": "string"
}

Production Order

Handles Production Orders.

List production orders

query Parameters
state
string
Enum: "all" "incomplete" "delayed" "completed" "voided"

Include only production orders with the given state. Allowed states: all, incomplete, delayed, completed, voided. (Default is incomplete)

itemId
string

Include only production orders with the given production item.

Responses

Response samples

Content type
application/json
{
  • "batch": "string",
  • "costCenterCode": "string",
  • "documentState": "completed",
  • "id": 0,
  • "inboundStockLocationId": "58a8b17c-cfb8-461c-a5b0-3bae5ca14b26",
  • "inboundStockPointId": "4d7045de-5283-430b-ab64-206c14d83d8a",
  • "itemDescription": "string",
  • "itemId": "string",
  • "itemUnit": "string",
  • "note": "string",
  • "outboundStockPointId": "70dbd7e7-8fb3-4fdd-9672-e1bd6ebda1f9",
  • "packageItems": [
    ],
  • "productionDate": "2019-08-24",
  • "productionState": "registered",
  • "projectId": "string",
  • "quantity": 0.01,
  • "startDate": "2019-08-24"
}

Create a new production order

Set itemId to the item to be produced.

Set quantity to number of units to produce.

Set startDate to production start state.

ProductionState is set to reserved by default. It can also be registered. Then no reservations will be made (no quantities will be assigned to the packageItems yet).

Setting outboundStockPointId (where the packageItems will be taken from), and inboundStockPointId (where the produced item will be put) is mandatory multiple stockpoints has been activated in the warehouse settings.

Before the document is released, the productionDate must be set.

The packageItems to include is easiest to get by calling the method getRequiredProductionParts.

Request Body schema: */*

the production order to create ProductionOrder

batch
string
costCenterCode
string
documentState
string
Enum: "completed" "voided"
id
integer <int64>
inboundStockLocationId
string <uuid>
inboundStockPointId
string <uuid>
itemDescription
string
itemId
string
itemUnit
string
note
string <= 1000 characters
outboundStockPointId
string <uuid>
Array of objects (warehouse_PackageItem)
productionDate
string <date>
productionState
required
string
Enum: "registered" "reserved" "ongoing"
projectId
string
quantity
required
number >= 0.01
startDate
required
string <date>

Responses

Response samples

Content type
application/json
{
  • "batch": "string",
  • "costCenterCode": "string",
  • "documentState": "completed",
  • "id": 0,
  • "inboundStockLocationId": "58a8b17c-cfb8-461c-a5b0-3bae5ca14b26",
  • "inboundStockPointId": "4d7045de-5283-430b-ab64-206c14d83d8a",
  • "itemDescription": "string",
  • "itemId": "string",
  • "itemUnit": "string",
  • "note": "string",
  • "outboundStockPointId": "70dbd7e7-8fb3-4fdd-9672-e1bd6ebda1f9",
  • "packageItems": [
    ],
  • "productionDate": "2019-08-24",
  • "productionState": "registered",
  • "projectId": "string",
  • "quantity": 0.01,
  • "startDate": "2019-08-24"
}

Get the package items (Bill Of Materials, BOMs) for a production article

If no parameters are supplied, the totalQuantityRequired for producing 1 unit is returned.

Query parameter quantity can optionally be supplied, which will calculate totalQuantityRequired.

If query parameter id is supplied, it will get the quantity from that Production Order (the quantity query parameter is ignored if id is included).

path Parameters
itemId
required
string

Production Article id

query Parameters
id
integer <int64>

the id of the production order (optional)

quantity
string

the quantity of the production order (assumed 1 if left empty)

Responses

Response samples

Content type
application/json
{
  • "itemDescription": "string",
  • "itemId": "string",
  • "itemUnit": "string",
  • "quantityRequired": 0,
  • "quantityReserved": 0,
  • "totalQuantityRequired": 0
}

Release a production order document

The document will be locked and bookkept.

The following error codes might be thrown:

PRODUCTION_DATE_IS_EMPTY
Production date cannot be empty.
CANNOT_RELEASE_AFTER_CURRENT_DATE
Document date cannot be in the future.
DOCUMENT_IS_VOIDED
The document has been voided and can no longer be modified.
DOCUMENT_IS_RELEASED
The document has already been released and can no longer be modified.
DOCUMENT_NOT_FULLY_RESERVED
The documents package items (BOMs, Bill Of Materials) has not been fully reserved (reserved quantity is not equal to total required quantity for one or more package item).
path Parameters
id
required
integer <int64>

Production Order document id.

Responses

Response samples

Content type
application/json
{
  • "batch": "string",
  • "costCenterCode": "string",
  • "documentState": "completed",
  • "id": 0,
  • "inboundStockLocationId": "58a8b17c-cfb8-461c-a5b0-3bae5ca14b26",
  • "inboundStockPointId": "4d7045de-5283-430b-ab64-206c14d83d8a",
  • "itemDescription": "string",
  • "itemId": "string",
  • "itemUnit": "string",
  • "note": "string",
  • "outboundStockPointId": "70dbd7e7-8fb3-4fdd-9672-e1bd6ebda1f9",
  • "packageItems": [
    ],
  • "productionDate": "2019-08-24",
  • "productionState": "registered",
  • "projectId": "string",
  • "quantity": 0.01,
  • "startDate": "2019-08-24"
}

Void a production order

A released production order might have connected outbounds, and can only be force voided. Note that a force void operation might cause a negative stock.

path Parameters
id
required
integer <int64>

Production Order document id.

query Parameters
force
boolean

true to force void a released document, default false

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "id": "string",
  • "message": "string"
}

Get Production Order document

path Parameters
id
required
integer <int64>

Production Order document id.

Responses

Response samples

Content type
application/json
{
  • "batch": "string",
  • "costCenterCode": "string",
  • "documentState": "completed",
  • "id": 0,
  • "inboundStockLocationId": "58a8b17c-cfb8-461c-a5b0-3bae5ca14b26",
  • "inboundStockPointId": "4d7045de-5283-430b-ab64-206c14d83d8a",
  • "itemDescription": "string",
  • "itemId": "string",
  • "itemUnit": "string",
  • "note": "string",
  • "outboundStockPointId": "70dbd7e7-8fb3-4fdd-9672-e1bd6ebda1f9",
  • "packageItems": [
    ],
  • "productionDate": "2019-08-24",
  • "productionState": "registered",
  • "projectId": "string",
  • "quantity": 0.01,
  • "startDate": "2019-08-24"
}

Update the note of a production order

When a Production Order has been released it is locked. However, the note field can still be updated using this endpoint.

path Parameters
id
required
integer <int64>

Production Order document id.

Request Body schema: */*

contains data to be patched onto the production order

note
string <= 1000 characters

Responses

Response samples

Content type
application/json
{
  • "batch": "string",
  • "costCenterCode": "string",
  • "documentState": "completed",
  • "id": 0,
  • "inboundStockLocationId": "58a8b17c-cfb8-461c-a5b0-3bae5ca14b26",
  • "inboundStockPointId": "4d7045de-5283-430b-ab64-206c14d83d8a",
  • "itemDescription": "string",
  • "itemId": "string",
  • "itemUnit": "string",
  • "note": "string",
  • "outboundStockPointId": "70dbd7e7-8fb3-4fdd-9672-e1bd6ebda1f9",
  • "packageItems": [
    ],
  • "productionDate": "2019-08-24",
  • "productionState": "registered",
  • "projectId": "string",
  • "quantity": 0.01,
  • "startDate": "2019-08-24"
}

Update a production order

Note that you must submit the full Production Order document when updating.

path Parameters
id
required
integer <int64>

Production Order document id.

Request Body schema: */*

the production order data see ProductionOrder

batch
string
costCenterCode
string
documentState
string
Enum: "completed" "voided"
id
integer <int64>
inboundStockLocationId
string <uuid>
inboundStockPointId
string <uuid>
itemDescription
string
itemId
string
itemUnit
string
note
string <= 1000 characters
outboundStockPointId
string <uuid>
Array of objects (warehouse_PackageItem)
productionDate
string <date>
productionState
required
string
Enum: "registered" "reserved" "ongoing"
projectId
string
quantity
required
number >= 0.01
startDate
required
string <date>

Responses

Response samples

Content type
application/json
{
  • "batch": "string",
  • "costCenterCode": "string",
  • "documentState": "completed",
  • "id": 0,
  • "inboundStockLocationId": "58a8b17c-cfb8-461c-a5b0-3bae5ca14b26",
  • "inboundStockPointId": "4d7045de-5283-430b-ab64-206c14d83d8a",
  • "itemDescription": "string",
  • "itemId": "string",
  • "itemUnit": "string",
  • "note": "string",
  • "outboundStockPointId": "70dbd7e7-8fb3-4fdd-9672-e1bd6ebda1f9",
  • "packageItems": [
    ],
  • "productionDate": "2019-08-24",
  • "productionState": "registered",
  • "projectId": "string",
  • "quantity": 0.01,
  • "startDate": "2019-08-24"
}

Purchase Order

Handles Purchase Orders

List Purchase Orders

List purchase orders matching the given parameters.

Sortable fields: id, supplier_number, order_date, internal_reference, response_state, delivery_date

query Parameters
q
string

Include only documents where id or internalReference-field contains the given text (case-insensitive).

supplierNumber
string

Include only documents with the given supplierNumber.

state
string
Enum: "NOT_SENT" "SENT" "SENT_NOT_REJECTED" "DELAYED" "RECEIVED" "VOIDED" "CURRENT" "ALL"

Include only documents with the given purchaseOrderState.

itemId
string

Include only documents with the given itemId.

purchaseType
string
Enum: "WAREHOUSE" "DROPSHIP"

Include only documents with the given purchaseType

internalReference
string

Include only documents where `internalReference' contains the given text (case-insensitive).

note
string

Include only documents where note-field contains the given text (case-insensitive).

Responses

Response samples

Content type
application/json
{
  • "confirmationEmail": "string",
  • "costCenterCode": "string",
  • "currencyCode": "str",
  • "currencyRate": 0,
  • "currencyUnit": 1,
  • "customerId": "string",
  • "customerName": "string",
  • "customerNumber": "string",
  • "deliveryAddress": "string",
  • "deliveryAddress2": "string",
  • "deliveryCity": "string",
  • "deliveryCountryCode": "str",
  • "deliveryDate": "2019-08-24",
  • "deliveryName": "string",
  • "deliveryZipCode": "string",
  • "dropship": true,
  • "id": 0,
  • "internalReference": "string",
  • "languageCode": "str",
  • "manuallyCompleted": true,
  • "messageToSupplier": "string",
  • "note": "string",
  • "orderDate": "2019-08-24",
  • "orderValue": 0,
  • "orderValueInSEK": 0,
  • "ourReference": "string",
  • "outboundDocumentReference": {
    },
  • "paymentTermsCode": "string",
  • "projectId": "string",
  • "purchaseOrderState": "NOT_SENT",
  • "purchaseType": "WAREHOUSE",
  • "responseState": "NOT_SENT",
  • "rows": [
    ],
  • "stockPointCode": "string",
  • "stockPointId": "7dcf5601-6c82-49ce-8b36-2dd2c353c71c",
  • "supplier": "string",
  • "supplierAddress": "string",
  • "supplierAddress2": "string",
  • "supplierCity": "string",
  • "supplierCountryCode": "str",
  • "supplierEmail": "string",
  • "supplierName": "string",
  • "supplierNumber": "string",
  • "supplierPostCode": "string",
  • "totalReceivedQuantity": 0,
  • "translatedResponseState": "string",
  • "voided": true,
  • "yourReference": "string"
}

Create Purchase Order

Request Body schema: */*

PurchaseOrder document.

confirmationEmail
string <= 100 characters
costCenterCode
string <= 25 characters
currencyCode
required
string <= 3 characters
currencyRate
required
number
currencyUnit
integer <int32> >= 1
customerId
string <= 25 characters
customerName
string <= 1024 characters
customerNumber
string <= 1024 characters
deliveryAddress
required
string [ 1 .. 1024 ] characters
deliveryAddress2
string <= 1024 characters
deliveryCity
required
string [ 1 .. 50 ] characters
deliveryCountryCode
string <= 3 characters
deliveryDate
string <date>
deliveryName
required
string [ 1 .. 50 ] characters
deliveryZipCode
required
string [ 1 .. 10 ] characters
dropship
boolean
id
integer <int64>
internalReference
string <= 50 characters
languageCode
string <= 3 characters
manuallyCompleted
boolean
messageToSupplier
string <= 1000 characters
note
string <= 1000 characters
orderDate
required
string <date>
orderValue
number
orderValueInSEK
number
ourReference
string <= 50 characters
object (warehouse_DocumentReference)
paymentTermsCode
required
string <= 20 characters
projectId
string <= 25 characters
purchaseOrderState
string
Enum: "NOT_SENT" "SENT" "SENT_NOT_REJECTED" "DELAYED" "RECEIVED" "VOIDED" "CURRENT" "ALL"
purchaseType
string
Enum: "WAREHOUSE" "DROPSHIP"
responseState
string
Enum: "NOT_SENT" "SENT" "ACCEPTED_WITH_REQ_DLV_DATE" "ACCEPTED_WITH_CHANGED_DLV_DATE" "PARTLY_ACCEPTED_WITH_REQ_DLV_DATE" "PARTLY_ACCEPTED_WITH_CHANGED_DLV_DATE" "REJECTED"
Array of objects (warehouse_PurchaseOrderRow)
stockPointCode
string
stockPointId
string <uuid>
supplier
string
supplierAddress
string <= 1024 characters
supplierAddress2
string <= 1024 characters
supplierCity
string <= 1024 characters
supplierCountryCode
string <= 3 characters
supplierEmail
string <= 100 characters
supplierName
string <= 1024 characters
supplierNumber
required
string <= 1024 characters
supplierPostCode
string <= 1024 characters
totalReceivedQuantity
number
translatedResponseState
string
voided
boolean
yourReference
string <= 50 characters

Responses

Response samples

Content type
application/json
{
  • "confirmationEmail": "string",
  • "costCenterCode": "string",
  • "currencyCode": "str",
  • "currencyRate": 0,
  • "currencyUnit": 1,
  • "customerId": "string",
  • "customerName": "string",
  • "customerNumber": "string",
  • "deliveryAddress": "string",
  • "deliveryAddress2": "string",
  • "deliveryCity": "string",
  • "deliveryCountryCode": "str",
  • "deliveryDate": "2019-08-24",
  • "deliveryName": "string",
  • "deliveryZipCode": "string",
  • "dropship": true,
  • "id": 0,
  • "internalReference": "string",
  • "languageCode": "str",
  • "manuallyCompleted": true,
  • "messageToSupplier": "string",
  • "note": "string",
  • "orderDate": "2019-08-24",
  • "orderValue": 0,
  • "orderValueInSEK": 0,
  • "ourReference": "string",
  • "outboundDocumentReference": {
    },
  • "paymentTermsCode": "string",
  • "projectId": "string",
  • "purchaseOrderState": "NOT_SENT",
  • "purchaseType": "WAREHOUSE",
  • "responseState": "NOT_SENT",
  • "rows": [
    ],
  • "stockPointCode": "string",
  • "stockPointId": "7dcf5601-6c82-49ce-8b36-2dd2c353c71c",
  • "supplier": "string",
  • "supplierAddress": "string",
  • "supplierAddress2": "string",
  • "supplierCity": "string",
  • "supplierCountryCode": "str",
  • "supplierEmail": "string",
  • "supplierName": "string",
  • "supplierNumber": "string",
  • "supplierPostCode": "string",
  • "totalReceivedQuantity": 0,
  • "translatedResponseState": "string",
  • "voided": true,
  • "yourReference": "string"
}

Get CSV list of Purchase Orders

query Parameters
q
string

Include only documents where id or internalReference-field contains the given text (case-insensitive).

supplierNumber
string

Include only documents with the given supplierNumber.

state
string
Enum: "NOT_SENT" "SENT" "SENT_NOT_REJECTED" "DELAYED" "RECEIVED" "VOIDED" "CURRENT" "ALL"

Include only documents with the given purchaseOrderState.

itemId
string

Include only documents with the given itemId.

purchaseType
string
Enum: "WAREHOUSE" "DROPSHIP"

Include only documents with the given purchaseType

internalReference
string

Include only documents where `internalReference' contains the given text (case-insensitive).

note
string

Include only documents where note-field contains the given text (case-insensitive).

showPurchaseTypeColumn
boolean

True to include the purchase type column, default is false.

Responses

Update response states

query Parameters
ids
Array of integers <int64> [ items <int64 > ]

List of purchase order ids.

Request Body schema: */*

The new response state.

responseState
string
Enum: "NOT_SENT" "SENT" "ACCEPTED_WITH_REQ_DLV_DATE" "ACCEPTED_WITH_CHANGED_DLV_DATE" "PARTLY_ACCEPTED_WITH_REQ_DLV_DATE" "PARTLY_ACCEPTED_WITH_CHANGED_DLV_DATE" "REJECTED"

Responses

Response samples

Content type
application/json
{
  • "confirmationEmail": "string",
  • "costCenterCode": "string",
  • "currencyCode": "str",
  • "currencyRate": 0,
  • "currencyUnit": 1,
  • "customerId": "string",
  • "customerName": "string",
  • "customerNumber": "string",
  • "deliveryAddress": "string",
  • "deliveryAddress2": "string",
  • "deliveryCity": "string",
  • "deliveryCountryCode": "str",
  • "deliveryDate": "2019-08-24",
  • "deliveryName": "string",
  • "deliveryZipCode": "string",
  • "dropship": true,
  • "id": 0,
  • "internalReference": "string",
  • "languageCode": "str",
  • "manuallyCompleted": true,
  • "messageToSupplier": "string",
  • "note": "string",
  • "orderDate": "2019-08-24",
  • "orderValue": 0,
  • "orderValueInSEK": 0,
  • "ourReference": "string",
  • "outboundDocumentReference": {
    },
  • "paymentTermsCode": "string",
  • "projectId": "string",
  • "purchaseOrderState": "NOT_SENT",
  • "purchaseType": "WAREHOUSE",
  • "responseState": "NOT_SENT",
  • "rows": [
    ],
  • "stockPointCode": "string",
  • "stockPointId": "7dcf5601-6c82-49ce-8b36-2dd2c353c71c",
  • "supplier": "string",
  • "supplierAddress": "string",
  • "supplierAddress2": "string",
  • "supplierCity": "string",
  • "supplierCountryCode": "str",
  • "supplierEmail": "string",
  • "supplierName": "string",
  • "supplierNumber": "string",
  • "supplierPostCode": "string",
  • "totalReceivedQuantity": 0,
  • "translatedResponseState": "string",
  • "voided": true,
  • "yourReference": "string"
}

Sends multiple purchase orders via email

Request Body schema: */*

List of Purchase order ids.

Array
integer <int64>

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "id": "string",
  • "message": "string"
}

Get Purchase Order

path Parameters
id
required
integer <int64>

Purchase order id.

query Parameters
ignoreIncomingGoodsId
integer <int64>

used for calculating the remaining ordered quantity. null will take the received quantity from all incoming goods

Responses

Response samples

Content type
application/json
{
  • "confirmationEmail": "string",
  • "costCenterCode": "string",
  • "currencyCode": "str",
  • "currencyRate": 0,
  • "currencyUnit": 1,
  • "customerId": "string",
  • "customerName": "string",
  • "customerNumber": "string",
  • "deliveryAddress": "string",
  • "deliveryAddress2": "string",
  • "deliveryCity": "string",
  • "deliveryCountryCode": "str",
  • "deliveryDate": "2019-08-24",
  • "deliveryName": "string",
  • "deliveryZipCode": "string",
  • "dropship": true,
  • "id": 0,
  • "internalReference": "string",
  • "languageCode": "str",
  • "manuallyCompleted": true,
  • "messageToSupplier": "string",
  • "note": "string",
  • "orderDate": "2019-08-24",
  • "orderValue": 0,
  • "orderValueInSEK": 0,
  • "ourReference": "string",
  • "outboundDocumentReference": {
    },
  • "paymentTermsCode": "string",
  • "projectId": "string",
  • "purchaseOrderState": "NOT_SENT",
  • "purchaseType": "WAREHOUSE",
  • "responseState": "NOT_SENT",
  • "rows": [
    ],
  • "stockPointCode": "string",
  • "stockPointId": "7dcf5601-6c82-49ce-8b36-2dd2c353c71c",
  • "supplier": "string",
  • "supplierAddress": "string",
  • "supplierAddress2": "string",
  • "supplierCity": "string",
  • "supplierCountryCode": "str",
  • "supplierEmail": "string",
  • "supplierName": "string",
  • "supplierNumber": "string",
  • "supplierPostCode": "string",
  • "totalReceivedQuantity": 0,
  • "translatedResponseState": "string",
  • "voided": true,
  • "yourReference": "string"
}

Update Purchase Order

path Parameters
id
required
integer <int64>

Purchase order id.

Request Body schema: */*

The PurchaseOrder document.

confirmationEmail
string <= 100 characters
costCenterCode
string <= 25 characters
currencyCode
required
string <= 3 characters
currencyRate
required
number
currencyUnit
integer <int32> >= 1
customerId
string <= 25 characters
customerName
string <= 1024 characters
customerNumber
string <= 1024 characters
deliveryAddress
required
string [ 1 .. 1024 ] characters
deliveryAddress2
string <= 1024 characters
deliveryCity
required
string [ 1 .. 50 ] characters
deliveryCountryCode
string <= 3 characters
deliveryDate
string <date>
deliveryName
required
string [ 1 .. 50 ] characters
deliveryZipCode
required
string [ 1 .. 10 ] characters
dropship
boolean
id
integer <int64>
internalReference
string <= 50 characters
languageCode
string <= 3 characters
manuallyCompleted
boolean
messageToSupplier
string <= 1000 characters
note
string <= 1000 characters
orderDate
required
string <date>
orderValue
number
orderValueInSEK
number
ourReference
string <= 50 characters
object (warehouse_DocumentReference)
paymentTermsCode
required
string <= 20 characters
projectId
string <= 25 characters
purchaseOrderState
string
Enum: "NOT_SENT" "SENT" "SENT_NOT_REJECTED" "DELAYED" "RECEIVED" "VOIDED" "CURRENT" "ALL"
purchaseType
string
Enum: "WAREHOUSE" "DROPSHIP"
responseState
string
Enum: "NOT_SENT" "SENT" "ACCEPTED_WITH_REQ_DLV_DATE" "ACCEPTED_WITH_CHANGED_DLV_DATE" "PARTLY_ACCEPTED_WITH_REQ_DLV_DATE" "PARTLY_ACCEPTED_WITH_CHANGED_DLV_DATE" "REJECTED"
Array of objects (warehouse_PurchaseOrderRow)
stockPointCode
string
stockPointId
string <uuid>
supplier
string
supplierAddress
string <= 1024 characters
supplierAddress2
string <= 1024 characters
supplierCity
string <= 1024 characters
supplierCountryCode
string <= 3 characters
supplierEmail
string <= 100 characters
supplierName
string <= 1024 characters
supplierNumber
required
string <= 1024 characters
supplierPostCode
string <= 1024 characters
totalReceivedQuantity
number
translatedResponseState
string
voided
boolean
yourReference
string <= 50 characters

Responses

Response samples

Content type
application/json
{
  • "confirmationEmail": "string",
  • "costCenterCode": "string",
  • "currencyCode": "str",
  • "currencyRate": 0,
  • "currencyUnit": 1,
  • "customerId": "string",
  • "customerName": "string",
  • "customerNumber": "string",
  • "deliveryAddress": "string",
  • "deliveryAddress2": "string",
  • "deliveryCity": "string",
  • "deliveryCountryCode": "str",
  • "deliveryDate": "2019-08-24",
  • "deliveryName": "string",
  • "deliveryZipCode": "string",
  • "dropship": true,
  • "id": 0,
  • "internalReference": "string",
  • "languageCode": "str",
  • "manuallyCompleted": true,
  • "messageToSupplier": "string",
  • "note": "string",
  • "orderDate": "2019-08-24",
  • "orderValue": 0,
  • "orderValueInSEK": 0,
  • "ourReference": "string",
  • "outboundDocumentReference": {
    },
  • "paymentTermsCode": "string",
  • "projectId": "string",
  • "purchaseOrderState": "NOT_SENT",
  • "purchaseType": "WAREHOUSE",
  • "responseState": "NOT_SENT",
  • "rows": [
    ],
  • "stockPointCode": "string",
  • "stockPointId": "7dcf5601-6c82-49ce-8b36-2dd2c353c71c",
  • "supplier": "string",
  • "supplierAddress": "string",
  • "supplierAddress2": "string",
  • "supplierCity": "string",
  • "supplierCountryCode": "str",
  • "supplierEmail": "string",
  • "supplierName": "string",
  • "supplierNumber": "string",
  • "supplierPostCode": "string",
  • "totalReceivedQuantity": 0,
  • "translatedResponseState": "string",
  • "voided": true,
  • "yourReference": "string"
}

Manually complete Purchase Order

The purchase order will be treated as fully received. Any remaining quantity will be ignored.

path Parameters
id
required
integer <int64>

Purchase order id.

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "id": "string",
  • "message": "string"
}

Manually complete dropship order

The dropship order will be treated as fully received. Any remaining quantity will be ignored.

path Parameters
id
required
integer <int64>

Purchase order id.

Responses

Response samples

Content type
application/json
{
  • "releasedParentOrder": true
}

List matched documents

Get a list of DocumentReference of linked/connected purchase orders to incoming goods and/or invoice document.

path Parameters
id
required
integer <int64>

Purchase order id.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "type": "string"
}

Get notes

Get notes for a purchase order.

path Parameters
id
required
integer <int64>

Purchase order id.

Responses

Response samples

Content type
application/json
{
  • "note": "string",
  • "purchaseOrderId": 0,
  • "purchaseOrderRowId": "ba867b0e-f326-42c4-9f43-58bde9b319da",
  • "rowNum": 0
}

Partial update Purchase Order

Perform a partial update of a purchase order, see PartialPurchaseOrder for possible fields that are updateable.

path Parameters
id
required
integer <int64>

Purchase order id.

Request Body schema: */*

the changes for the purchase order, see PartialPurchaseOrder

deliveryDate
string <date>
internalReference
string <= 50 characters
messageToSupplier
string <= 1000 characters
note
string <= 1000 characters
supplierName
string <= 1024 characters

Responses

Response samples

Content type
application/json
{
  • "deliveryDate": "2019-08-24",
  • "internalReference": "string",
  • "messageToSupplier": "string",
  • "note": "string",
  • "supplierName": "string"
}

Update response state

path Parameters
id
required
integer <int64>

Purchase order id.

Request Body schema: */*

The new response state.

responseState
string
Enum: "NOT_SENT" "SENT" "ACCEPTED_WITH_REQ_DLV_DATE" "ACCEPTED_WITH_CHANGED_DLV_DATE" "PARTLY_ACCEPTED_WITH_REQ_DLV_DATE" "PARTLY_ACCEPTED_WITH_CHANGED_DLV_DATE" "REJECTED"

Responses

Response samples

Content type
application/json
{
  • "confirmationEmail": "string",
  • "costCenterCode": "string",
  • "currencyCode": "str",
  • "currencyRate": 0,
  • "currencyUnit": 1,
  • "customerId": "string",
  • "customerName": "string",
  • "customerNumber": "string",
  • "deliveryAddress": "string",
  • "deliveryAddress2": "string",
  • "deliveryCity": "string",
  • "deliveryCountryCode": "str",
  • "deliveryDate": "2019-08-24",
  • "deliveryName": "string",
  • "deliveryZipCode": "string",
  • "dropship": true,
  • "id": 0,
  • "internalReference": "string",
  • "languageCode": "str",
  • "manuallyCompleted": true,
  • "messageToSupplier": "string",
  • "note": "string",
  • "orderDate": "2019-08-24",
  • "orderValue": 0,
  • "orderValueInSEK": 0,
  • "ourReference": "string",
  • "outboundDocumentReference": {
    },
  • "paymentTermsCode": "string",
  • "projectId": "string",
  • "purchaseOrderState": "NOT_SENT",
  • "purchaseType": "WAREHOUSE",
  • "responseState": "NOT_SENT",
  • "rows": [
    ],
  • "stockPointCode": "string",
  • "stockPointId": "7dcf5601-6c82-49ce-8b36-2dd2c353c71c",
  • "supplier": "string",
  • "supplierAddress": "string",
  • "supplierAddress2": "string",
  • "supplierCity": "string",
  • "supplierCountryCode": "str",
  • "supplierEmail": "string",
  • "supplierName": "string",
  • "supplierNumber": "string",
  • "supplierPostCode": "string",
  • "totalReceivedQuantity": 0,
  • "translatedResponseState": "string",
  • "voided": true,
  • "yourReference": "string"
}

Send purchase order via email

Sends the purchase order with the specified id to the recipient and sets the purchase order state to SENT

path Parameters
id
required
integer <int64>

Purchase order id.

Request Body schema: */*

see PurchaseOrderMailSettings

body
required
string
bodyAsHtml
string
receiver
required
string
receiverCopy
string
receiverSecretCopy
string
replyTo
required
string
senderName
string
subject
required
string

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "id": "string",
  • "message": "string"
}

Void Purchase Order

path Parameters
id
required
integer <int64>

Purchase order id.

Responses

Response samples

Content type
application/json
{
  • "error": "string",
  • "id": "string",
  • "message": "string"
}

Stock Point

Resource to handle StockPoints.

List stock points

List stock points, optionally include a query parameter `q` to filter on stock point code or name.

Use query param `state` to filter on ACTIVE, INACTIVE or ALL (default is to include only ACTIVE stock points).

Stock locations are NOT included in the response.

query Parameters
q
string

filters on stock point code or name.

state
string
Enum: "ALL" "ACTIVE" "INACTIVE"

filter on stock point state

Responses

Response samples

Content type
application/json
{
  • "active": true,
  • "code": "string",
  • "deliveryAddress": "string",
  • "deliveryAddress2": "string",
  • "deliveryCity": "string",
  • "deliveryCountryCode": "str",
  • "deliveryName": "string",
  • "deliveryPhone": "string",
  • "deliveryZipCode": "string",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "stockLocations": [
    ],
  • "usingCompanyAddress": true
}

Create stock point

Both code and name are mandatory.

If you want to set a custom delivery address for this stock point, you must remember to set usingCompanyAddress to false.

Returns 400 alreadyexists if a stock point with same code already exists.

Returns 400 duplicatestocklocations if two or more stock locations have the same code.

Request Body schema: application/json

stock point

active
boolean
code
required
string [ 1 .. 10 ] characters
deliveryAddress
string <= 50 characters
deliveryAddress2
string <= 50 characters
deliveryCity
string <= 50 characters
deliveryCountryCode
string <= 3 characters
deliveryName
string <= 50 characters
deliveryPhone
string <= 50 characters
deliveryZipCode
string <= 10 characters
id
string <uuid>
name
required
string [ 1 .. 25 ] characters
Array of objects (warehouse_StockLocation)
usingCompanyAddress
boolean

Responses

Request samples

Content type
application/json
{
  • "active": true,
  • "code": "string",
  • "deliveryAddress": "string",
  • "deliveryAddress2": "string",
  • "deliveryCity": "string",
  • "deliveryCountryCode": "str",
  • "deliveryName": "string",
  • "deliveryPhone": "string",
  • "deliveryZipCode": "string",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "stockLocations": [
    ],
  • "usingCompanyAddress": true
}

Response samples

Content type
application/json
{
  • "active": true,
  • "code": "string",
  • "deliveryAddress": "string",
  • "deliveryAddress2": "string",
  • "deliveryCity": "string",
  • "deliveryCountryCode": "str",
  • "deliveryName": "string",
  • "deliveryPhone": "string",
  • "deliveryZipCode": "string",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "stockLocations": [
    ],
  • "usingCompanyAddress": true
}

Get stock points

Get stock points by IDs.

Use query param `state` to filter on ACTIVE, INACTIVE or ALL (default is to include ALL stock points).

Stock locations are NOT included in the response.

query Parameters
ids
Array of strings <uuid> [ items <uuid > ]

stock point ids (comma separated list of UUIDs)

state
string
Enum: "ALL" "ACTIVE" "INACTIVE"

filter on StockPointState, default is to include ALL stock points.

Responses

Response samples

Content type
application/json
{
  • "active": true,
  • "code": "string",
  • "deliveryAddress": "string",
  • "deliveryAddress2": "string",
  • "deliveryCity": "string",
  • "deliveryCountryCode": "str",
  • "deliveryName": "string",
  • "deliveryPhone": "string",
  • "deliveryZipCode": "string",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "stockLocations": [
    ],
  • "usingCompanyAddress": true
}

Delete stock point

Note that it is not allowed to delete a stock point that is in use.

path Parameters
id
required
string <uuid>

id

Responses

Response samples

Content type
application/json
{
  • "active": true,
  • "code": "string",
  • "deliveryAddress": "string",
  • "deliveryAddress2": "string",
  • "deliveryCity": "string",
  • "deliveryCountryCode": "str",
  • "deliveryName": "string",
  • "deliveryPhone": "string",
  • "deliveryZipCode": "string",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "stockLocations": [
    ],
  • "usingCompanyAddress": true
}

Get stock point

Get stock point by id or code.

path Parameters
id
required
string

stock point code, or stock point id

Responses

Response samples

Content type
application/json
{
  • "active": true,
  • "code": "string",
  • "deliveryAddress": "string",
  • "deliveryAddress2": "string",
  • "deliveryCity": "string",
  • "deliveryCountryCode": "str",
  • "deliveryName": "string",
  • "deliveryPhone": "string",
  • "deliveryZipCode": "string",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "stockLocations": [
    ],
  • "usingCompanyAddress": true
}

Append stock locations

Add new stock locations to specific StockPoint.

If you include an already existing stock location code, it will be ignored.

path Parameters
id
required
string <uuid>

stock point id

Request Body schema: application/json

A list of StockLocations to append.

Array
code
required
string [ 1 .. 20 ] characters
id
string <uuid>
name
string <= 25 characters
stockPointId
string <uuid>

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "code": "string",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "stockPointId": "7dcf5601-6c82-49ce-8b36-2dd2c353c71c"
}

Update stock point

Remember to supply the complete representation of stock point including stock locations.

path Parameters
id
required
string <uuid>

id

Request Body schema: application/json

complete representation of stock point including stock locations.

active
boolean
code
required
string [ 1 .. 10 ] characters
deliveryAddress
string <= 50 characters
deliveryAddress2
string <= 50 characters
deliveryCity
string <= 50 characters
deliveryCountryCode
string <= 3 characters
deliveryName
string <= 50 characters
deliveryPhone
string <= 50 characters
deliveryZipCode
string <= 10 characters
id
string <uuid>
name
required
string [ 1 .. 25 ] characters
Array of objects (warehouse_StockLocation)
usingCompanyAddress
boolean

Responses

Request samples

Content type
application/json
{
  • "active": true,
  • "code": "string",
  • "deliveryAddress": "string",
  • "deliveryAddress2": "string",
  • "deliveryCity": "string",
  • "deliveryCountryCode": "str",
  • "deliveryName": "string",
  • "deliveryPhone": "string",
  • "deliveryZipCode": "string",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "stockLocations": [
    ],
  • "usingCompanyAddress": true
}

Response samples

Content type
application/json
{
  • "active": true,
  • "code": "string",
  • "deliveryAddress": "string",
  • "deliveryAddress2": "string",
  • "deliveryCity": "string",
  • "deliveryCountryCode": "str",
  • "deliveryName": "string",
  • "deliveryPhone": "string",
  • "deliveryZipCode": "string",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "stockLocations": [
    ],
  • "usingCompanyAddress": true
}

Get stock locations

List stock locations for a specific stock point.

Optionally include a query parameter `q` to filter on stock location code or name.

path Parameters
id
required
string

stock point id or code

query Parameters
q
string

filters on stock location code or name.

Responses

Response samples

Content type
application/json
{
  • "code": "string",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "stockPointId": "7dcf5601-6c82-49ce-8b36-2dd2c353c71c"
}

Stock Status

Handles stock status.

Get stock balance

Get stock balance for each stockpoint.

Returns a list of itemId, stockPointCode, availableStock, inStock.

(The difference between availableStock and inStock is the reserved amount.)

query Parameters
itemIds
Array of strings

Optional filter on itemIds (comma-separated)

stockPointCodes
Array of strings

Optional filter on stock point codes (comma-separated).

Responses

Response samples

Content type
application/json
{
  • "availableStock": 0,
  • "inStock": 0,
  • "itemId": "string",
  • "stockPointCode": "string"
}

Stock Taking

Handles stock taking.

A Stock Taking document is created in state "planning". Rows, containing item-stockpoint-stocklocation combinations to be counted, are added to the Stock Taking document.

When the planning is done, the Stock Taking document is updated to state "started", and the stock taking begins.

Setting the stock taken quantity is done by updating the Stock Taking document, and supplying the counted rows. This can be done in "batches", i.e. not all rows needs to be updated at once.

When the stock taking is done, the document is released. The release process will adjust the stock for the stock taking date, and prepare the warehouse bookkeeping data.

List stock takings

Sortable fields: id, name, date, responsible, state

query Parameters
state
string
Enum: "all" "planning" "started" "completed" "voided"

Include only stock takings with the given state.

itemId
string

Include only stock takings with the given item.

Responses

Response samples

Content type
application/json
{
  • "costCenterCode": "string",
  • "date": "2019-08-24",
  • "id": 0,
  • "name": "string",
  • "projectId": "string",
  • "responsible": "string",
  • "rows": [
    ],
  • "sortParams": {
    },
  • "sortingId": 0,
  • "state": "planning|started|completed|voided",
  • "usingStockPoints": true
}

Create stock taking

Create a new Stock Taking document. The only mandatory fields are name and responsible. state will be set to planning for a newly created document.

The date-field is not mandatory for documents in state planning. However, when you update the state to started you have to provide a date.

name is a descriptive name of the stock taking.

responsible is the name of the responsible for the stock taking.

rows are added after creation by using the addRows-method.

projectId and costCenterCode are used for book-keeping, when the Stock Taking document is released.

The field usingStockPoints is set from Warehouse system settings upon creation. If multiple stockpoints is used, then the rows will be per item-stockPoint-stockLocation. If multiple stockpoints is NOT used, then the rows will be per item-stockLocation.

Request Body schema: */*

stock taking

costCenterCode
string
date
string <date>
id
integer <int64>
name
required
string [ 1 .. 50 ] characters
projectId
string
responsible
required
string [ 1 .. 50 ] characters
Array of objects (warehouse_StockTakingRow)
object (warehouse_StockTakingSortParams)
sortingId
integer <int32>
state
required
stringplanning|started|completed|voided
usingStockPoints
boolean

Responses