GET

Description

Get a custom outbound document

Method

GET

Version

1

Parameters

Type

Document type
Type is a custom name/reference of the document that is used to reference the document type

Id

Document Id

Exceptions

WebException – NOT_FOUND

If the document does not exist

WebException – BAD_REQUEST

referenceTypeNotAllowed – If type is not allowed to be used

Response

<?xml version="1.0" encoding="UTF-8" ?>
	<id>1</id>
	<referenceType>type</referenceType>
	<date>2018-10-22</date>
	<note>a note</note>
	<warehouseReady>true</warehouseReady>
	<forcedDelivery>true</forcedDelivery>
	<voided>true</voided>
	<averageCosts>
		<itemId>1</itemId>
		<stockPointId>c20e21cf-c223-4a2f-85b0-05c54a36a80e</stockPointId>
		<averageCostInSEK>10</averageCostInSEK>
	</averageCosts>
	<rows>
		<rowId>1</rowId>
		<itemId>anItem</itemId>
		<quantity>2</quantity>
		<stockPointId>c20e21cf-c223-4a2f-85b0-05c54a36a80e</stockPointId>
		<stockLocationId>f266e70a-a1f5-4ac4-be5a-33db6edde35e</stockLocationId>
		<costCenterCode>CostCenter_1</costCenterCode>
		<projectId>Project_1</projectId>
		<itemDescription>The item that we use</itemDescription>
		<itemUnit>st</itemUnit>
		<reservedQuantity>0</reservedQuantity>
		<deliveredQuantity>0</deliveredQuantity>
		<forcedQuantity>0</forcedQuantity>
	</rows>
	<deliveryState>registration</deliveryState>
{
  "id": "1",
  "referenceType": "type",
  "date": "2018-10-22",
  "note": "a note",
  "warehouseReady": true,
  "forcedDelivery": true,
  "voided": true,
  "averageCosts": [
    {
      "itemId": "1",
      "stockPointId": "c20e21cf-c223-4a2f-85b0-05c54a36a80e",
      "averageCostInSEK": 10
    }
  ],
  "rows": [
    {
      "rowId": 1,
      "itemId": "anItem",
      "quantity": 2,
      "stockPointId": "c20e21cf-c223-4a2f-85b0-05c54a36a80e",
      "stockLocationId": "f266e70a-a1f5-4ac4-be5a-33db6edde35e",
      "costCenterCode": "CostCenter_1",
      "projectId": "Project_1",
      "itemDescription": "The item that we use",
      "itemUnit": "st",
      "reservedQuantity": 0,
      "deliveredQuantity": 0,
      "forcedQuantity": 0
    }
  ],
  "deliveryState": "registration"
}

SAVE

Description

Save a custom outbound document

Method

PUT

Version

1

Parameters

Type

Document type
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 OUTBOUND category.
* * If type is an existing custom document type of category INTBOUND an error is thrown.
* * If type is invalid an error is thrown.

Id

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

Exceptions

WebException – BAD_REQUEST

cannot_create_later_than_current_date – Document date cannot be in the future

referenceTypeAlreadyExists – If type is an existing custom document type of category OUTBOUND

referenceTypeNotAllowed – If type is not allowed to be used.

Validation exception(s) – If the document contains invalid data

Request

<?xml version="1.0" encoding="UTF-8" ?>
	<date>2018-10-22</date>
	<currency>
		<currency>SEK</currency>
		<rate>1</rate>
		<unit>1</unit>
	</currency>
	<note>This is a note</note>
	<deliveryState>delivery</deliveryState>
	<warehouseReady>true</warehouseReady>
	<voided>true</voided>
	<rows>
		<rowId>1</rowId>
		<itemId>anItem</itemId>
		<quantity>1</quantity>
		<directCost>10</directCost>
		<freightCost>5</freightCost>
		<otherCost>2</otherCost>
		<batch>001/SE</batch>
		<stockPointId>0add3abf-7969-449b-8ee5-211e3d3f4be3</stockPointId>
		<stockPointCode>Standardlagerställe</stockPointCode>
		<stockLocationId>cdcddfad-1272-4b82-8242-35f9ac59d8ab</stockLocationId>
		<stockLocationCode>Standardlagerplats</stockLocationCode>
		<costCenterCode>Kostnadställe 1</costCenterCode>
		<projectId>Projekt 1</projectId>
		<itemDescription>an item that we use</itemDescription>
		<itemUnit>st</itemUnit>
	</rows>
	
{
  "date": "2018-10-22",
  "currency": {
    "currency": "SEK",
    "rate": 1,
    "unit": 1
  },
  "note": "This is a note",
  "deliveryState": "delivery",
  "warehouseReady": true,
  "voided": true,
  "rows": [
    {
      "rowId": 1,
      "itemId": "anItem",
      "quantity": 1,
      "directCost": 10,
      "freightCost": 5,
      "otherCost": 2,
      "batch": "001/SE",
      "stockPointId": "0add3abf-7969-449b-8ee5-211e3d3f4be3",
      "stockPointCode": "Standardlagerställe",
      "stockLocationId": "cdcddfad-1272-4b82-8242-35f9ac59d8ab",
      "stockLocationCode": "Standardlagerplats",
      "costCenterCode": "Kostnadställe 1",
      "projectId": "Projekt 1",
      "itemDescription": "an item that we use",
      "itemUnit": "st"
    }
  ]
}

Response

<?xml version="1.0" encoding="UTF-8" ?>
	<id>1</id>
	<referenceType>type</referenceType>
	<date>2018-10-22</date>
	<note>a note</note>
	<warehouseReady>true</warehouseReady>
	<forcedDelivery>true</forcedDelivery>
	<voided>true</voided>
	<averageCosts>
		<itemId>1</itemId>
		<stockPointId>c20e21cf-c223-4a2f-85b0-05c54a36a80e</stockPointId>
		<averageCostInSEK>10</averageCostInSEK>
	</averageCosts>
	<rows>
		<rowId>1</rowId>
		<itemId>anItem</itemId>
		<quantity>2</quantity>
		<stockPointId>c20e21cf-c223-4a2f-85b0-05c54a36a80e</stockPointId>
		<stockLocationId>f266e70a-a1f5-4ac4-be5a-33db6edde35e</stockLocationId>
		<costCenterCode>CostCenter_1</costCenterCode>
		<projectId>Project_1</projectId>
		<itemDescription>The item that we use</itemDescription>
		<itemUnit>st</itemUnit>
		<reservedQuantity>0</reservedQuantity>
		<deliveredQuantity>0</deliveredQuantity>
		<forcedQuantity>0</forcedQuantity>
	</rows>
	<deliveryState>registration</deliveryState>
	
{
  "id": "1",
  "referenceType": "type",
  "date": "2018-10-22",
  "note": "a note",
  "warehouseReady": true,
  "forcedDelivery": true,
  "voided": true,
  "averageCosts": [
    {
      "itemId": "1",
      "stockPointId": "c20e21cf-c223-4a2f-85b0-05c54a36a80e",
      "averageCostInSEK": 10
    }
  ],
  "rows": [
    {
      "rowId": 1,
      "itemId": "anItem",
      "quantity": 2,
      "stockPointId": "c20e21cf-c223-4a2f-85b0-05c54a36a80e",
      "stockLocationId": "f266e70a-a1f5-4ac4-be5a-33db6edde35e",
      "costCenterCode": "CostCenter_1",
      "projectId": "Project_1",
      "itemDescription": "The item that we use",
      "itemUnit": "st",
      "reservedQuantity": 0,
      "deliveredQuantity": 0,
      "forcedQuantity": 0
    }
  ],
  "deliveryState": "registration"
}

RELEASE

Description

Release a custom inbound document

Method

PUT

Version

1

Parameters

Type

Document type
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 invalid an error is thrown.

Id

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

Exceptions

WebException – BAD_REQUEST

document_is_voided – if the document is already voided

cannot_create_later_than_current_date – Document date cannot be in the future

referenceTypeNotAllowed – If type is not allowed to be used

period_locked – If Book keeping period is locked

Response

HTTP Status code 200 OK
HTTP Status code 400 Bad request
HTTP Status code 404 Not found

VOID

Description

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.

Method

PUT

Version

1

Parameters

Type

Document type
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 invalid an error is thrown.

Id

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

Force

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

Exceptions

WebException – NOT_FOUND

if the document was not found

WebException – BAD_REQUEST

referenceTypeNotAllowed – If type is not allowed to be used

Response

HTTP Status code 200 OK
HTTP Status code 400 Bad request
HTTP Status code 404 Not found

PROPERTIES

Custom Outbound Document

Property Description
id String, min length 1, max length 25
id of the document
referenceType String, min length 1, max length 25
type of the document
date LocalDate
The date the document is created
note String, max length 1000
Optional note that can be attached to the document
warehouseready boolean
Warehouse ready status, a ready document is locked for changes, and prepared for book keeping
forcedDelivery Boolean, write only attribute
Set to true if the outbound delivery should be made even if sufficient stock isn’t available, possibly causing a negative stock balance.
voided boolean, ready only attribute
averageCosts List<AverageCost>, ready only attribute
Average cost of included items
rows List<CustomOutboundDocumentRow>
The document rows.
deliveryState DeliveryState
Possible values:
registration
reservation
delivery

Average Cost

Property Description
itemId String
The item id
stockPointId UUID
Id of the stockpoint
averageCostInSEK BigDecimal
Average calculated cost in SEK

CustomOutboundDocumentRow

Property Description
rowId long, min 1L
The row id
itemId String min 1, max 50
the item id
quantity BigDecimal, default 0
Quantity of item
stockPointId UUID
Requested stock point id. If not set, the item will be picked from any stock point, according to fifo
stockLocationId UUID
Requested stock location id. If not set, the item will be picked from any stock location, according to fifo.
costCenterCode String, min 1, max 25, nullable
Code of the cost center
projectId String, min 1, max 25, nullable
Id of the project
itemDescription String max 200
Item description, not mandatory, item description from article will always override this.
itemUnit String max 50
item unit, not mandatory, item unit from article will always override this.
reservedQuantity BigDecimal, read only attribute
Number of items that were reserved
deliveredQuantity BigDecimal, read only attribute
Number of items that were delivered
forcedQuantity BigDecimal, read only attribute
Number of items that were force delivered