Skip to content

Depot sales orders

Registers the sales-order routes on psaMux (msp only).

This page is generated from the Depot route table. Every operation carries the permission it needs and the anchor an agent can link to.

GETcrm:readmsp facemspIdempotent

Source: [object Object]

listOrders lists sales orders, newest first by default.

NameInTypeRequiredDescription
dirquerystring, one of asc, descNoSort direction.
pagequeryintegerNoOne-based page number. Defaults to 1.
pageSizequeryintegerNoRows per page, 1 to 200. Defaults to 50.
qquerystringNoFree-text search term.
sortquerystring, one of number, ordered, totalNoSort key.
statusquerystring, one of cancelled, closed, fulfilled, open, partially_fulfilledNoComma-separated set. An unrecognised value is refused.
StatusBodyDescription
200application/json, PagedResultSoSummaryViewSuccess.
400application/problem+json, ProblemDetailsOne or more validation errors occurred.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold crm:read.
404application/problem+json, ProblemDetailsNo resource matches.
409application/problem+json, ProblemDetailsThe request conflicts with the current state of the order.
412application/problem+json, ProblemDetailsSomeone else changed this since you opened it. Reload and try again.
500application/problem+json, ProblemDetailsThe request failed.

200 response body

FieldTypeDescription
itemsrequiredarray of SoSummaryView
items[].clientIdrequiredstring
items[].clientNamerequiredstring
items[].invoiceModerequiredstring
items[].orderedAtrequiredstring (date-time)
items[].originrequiredstring
items[].ownerNamestring or null
items[].publicIdrequiredstring
items[].soNumberrequiredstring
items[].statusrequiredstring
items[].totalCentsrequiredinteger

int64.

pagerequiredinteger
pageSizerequiredinteger
totalrequiredinteger
Terminal window
# Sign in first. outpost_console is a session cookie, so send it with every request.
# This operation is idempotent. Repeating it does not repeat its effect.
curl -X GET 'https://depot.example.com/api/v1/sales/orders?dir=asc&page=0&pageSize=0&q=<q>&sort=number&status=cancelled' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-b 'outpost_console=<console-session>'

POSTcrm:writemsp facemsp

Source: [object Object]

createOrder raises a manual sales order (no quote).

The invoice mode defaults to the practice’s; a manual order carries no deposit, because there is no acceptance invoice to charge it on.

Required, sent as application/json.

The body is any.

StatusBodyDescription
201application/json, SoViewCreated.
400application/problem+json, ProblemDetailsOne or more validation errors occurred.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold crm:write.
404application/problem+json, ProblemDetailsNo resource matches.
409application/problem+json, ProblemDetailsThe request conflicts with the current state of the order.
412application/problem+json, ProblemDetailsSomeone else changed this since you opened it. Reload and try again.
500application/problem+json, ProblemDetailsThe request failed.

201 response body

FieldTypeDescription
cancelReasonrequiredstring
cancelledAtstring (date-time) or null
clientIdrequiredstring
clientNamerequiredstring
closedAtstring (date-time) or null
customerPorequiredstring
depositBasisPointsrequiredinteger
depositCentsrequiredinteger

int64.

depositInvoiceIdstring or null
fulfilledAtstring (date-time) or null
invoiceModerequiredstring
linesrequiredarray of SoLineView
lines[].catalogItemIdstring or null
lines[].descriptionrequiredstring
lines[].discountBasisPointsrequiredinteger
lines[].fulfillablerequiredboolean
lines[].kindrequiredstring
lines[].positionrequiredinteger
lines[].publicIdrequiredstring
lines[].qtyCancelledrequiredstring
lines[].qtyFulfilledrequiredstring
lines[].qtyInvoicedrequiredstring
lines[].qtyOnOrderrequiredstring
lines[].quantityrequiredstring
lines[].rowVersionrequiredinteger

int64.

lines[].serializedrequiredboolean
lines[].stockItemIdstring or null
lines[].taxablerequiredboolean
lines[].unitrequiredstring
lines[].unitCostCentsrequiredinteger

int64.

lines[].unitPriceCentsrequiredinteger

int64.

notesrequiredstring
opportunityIdstring or null
opportunityNamestring or null
orderedAtrequiredstring (date-time)
originrequiredstring
ownerNamestring or null
ownerUserIdstring or null
publicIdrequiredstring
quoteIdstring or null
quoteNumberstring or null
rowVersionrequiredinteger

int64.

soNumberrequiredstring
statusrequiredstring
subtotalCentsrequiredinteger

int64.

taxCentsrequiredinteger

int64.

taxRateBasisPointsrequiredinteger
totalCentsrequiredinteger

int64.

Terminal window
# Sign in first. outpost_console is a session cookie, so send it with every request.
curl -X POST 'https://depot.example.com/api/v1/sales/orders' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-b 'outpost_console=<console-session>' \
--data '"string"'

GETcrm:readmsp facemspIdempotent

Source: [object Object]

getOrder answers one sales order with its lines.

NameInTypeRequiredDescription
idpathstringYesA uuid.
StatusBodyDescription
200application/json, SoViewSuccess.
400application/problem+json, ProblemDetailsOne or more validation errors occurred.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold crm:read.
404application/problem+json, ProblemDetailsNo resource matches that id.
409application/problem+json, ProblemDetailsThe request conflicts with the current state of the order.
412application/problem+json, ProblemDetailsSomeone else changed this since you opened it. Reload and try again.
500application/problem+json, ProblemDetailsThe request failed.

200 response body

FieldTypeDescription
cancelReasonrequiredstring
cancelledAtstring (date-time) or null
clientIdrequiredstring
clientNamerequiredstring
closedAtstring (date-time) or null
customerPorequiredstring
depositBasisPointsrequiredinteger
depositCentsrequiredinteger

int64.

depositInvoiceIdstring or null
fulfilledAtstring (date-time) or null
invoiceModerequiredstring
linesrequiredarray of SoLineView
lines[].catalogItemIdstring or null
lines[].descriptionrequiredstring
lines[].discountBasisPointsrequiredinteger
lines[].fulfillablerequiredboolean
lines[].kindrequiredstring
lines[].positionrequiredinteger
lines[].publicIdrequiredstring
lines[].qtyCancelledrequiredstring
lines[].qtyFulfilledrequiredstring
lines[].qtyInvoicedrequiredstring
lines[].qtyOnOrderrequiredstring
lines[].quantityrequiredstring
lines[].rowVersionrequiredinteger

int64.

lines[].serializedrequiredboolean
lines[].stockItemIdstring or null
lines[].taxablerequiredboolean
lines[].unitrequiredstring
lines[].unitCostCentsrequiredinteger

int64.

lines[].unitPriceCentsrequiredinteger

int64.

notesrequiredstring
opportunityIdstring or null
opportunityNamestring or null
orderedAtrequiredstring (date-time)
originrequiredstring
ownerNamestring or null
ownerUserIdstring or null
publicIdrequiredstring
quoteIdstring or null
quoteNumberstring or null
rowVersionrequiredinteger

int64.

soNumberrequiredstring
statusrequiredstring
subtotalCentsrequiredinteger

int64.

taxCentsrequiredinteger

int64.

taxRateBasisPointsrequiredinteger
totalCentsrequiredinteger

int64.

Terminal window
# Sign in first. outpost_console is a session cookie, so send it with every request.
# This operation is idempotent. Repeating it does not repeat its effect.
curl -X GET 'https://depot.example.com/api/v1/sales/orders/<id>' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-b 'outpost_console=<console-session>'

PATCHcrm:writemsp facemspIdempotent

Source: [object Object]

patchOrder edits the header: owner, customer PO and notes.

NameInTypeRequiredDescription
idpathstringYesA uuid.

Required, sent as application/json.

The body is any.

StatusBodyDescription
200application/json, SoViewSuccess.
400application/problem+json, ProblemDetailsOne or more validation errors occurred.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold crm:write.
404application/problem+json, ProblemDetailsNo resource matches that id.
409application/problem+json, ProblemDetailsThe request conflicts with the current state of the order.
412application/problem+json, ProblemDetailsSomeone else changed this since you opened it. Reload and try again.
500application/problem+json, ProblemDetailsThe request failed.

200 response body

FieldTypeDescription
cancelReasonrequiredstring
cancelledAtstring (date-time) or null
clientIdrequiredstring
clientNamerequiredstring
closedAtstring (date-time) or null
customerPorequiredstring
depositBasisPointsrequiredinteger
depositCentsrequiredinteger

int64.

depositInvoiceIdstring or null
fulfilledAtstring (date-time) or null
invoiceModerequiredstring
linesrequiredarray of SoLineView
lines[].catalogItemIdstring or null
lines[].descriptionrequiredstring
lines[].discountBasisPointsrequiredinteger
lines[].fulfillablerequiredboolean
lines[].kindrequiredstring
lines[].positionrequiredinteger
lines[].publicIdrequiredstring
lines[].qtyCancelledrequiredstring
lines[].qtyFulfilledrequiredstring
lines[].qtyInvoicedrequiredstring
lines[].qtyOnOrderrequiredstring
lines[].quantityrequiredstring
lines[].rowVersionrequiredinteger

int64.

lines[].serializedrequiredboolean
lines[].stockItemIdstring or null
lines[].taxablerequiredboolean
lines[].unitrequiredstring
lines[].unitCostCentsrequiredinteger

int64.

lines[].unitPriceCentsrequiredinteger

int64.

notesrequiredstring
opportunityIdstring or null
opportunityNamestring or null
orderedAtrequiredstring (date-time)
originrequiredstring
ownerNamestring or null
ownerUserIdstring or null
publicIdrequiredstring
quoteIdstring or null
quoteNumberstring or null
rowVersionrequiredinteger

int64.

soNumberrequiredstring
statusrequiredstring
subtotalCentsrequiredinteger

int64.

taxCentsrequiredinteger

int64.

taxRateBasisPointsrequiredinteger
totalCentsrequiredinteger

int64.

Terminal window
# Sign in first. outpost_console is a session cookie, so send it with every request.
# This operation is idempotent. Repeating it does not repeat its effect.
curl -X PATCH 'https://depot.example.com/api/v1/sales/orders/<id>' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-b 'outpost_console=<console-session>' \
--data '"string"'

POSTcrm:writemsp facemspIdempotent

Source: [object Object]

cancelOrder cancels an order nothing has shipped from (409 hasFulfillments).

NameInTypeRequiredDescription
idpathstringYesA uuid.

Required, sent as application/json.

FieldTypeDescription
reasonrequiredstring
StatusBodyDescription
200application/json, SoViewSuccess.
400application/problem+json, ProblemDetailsOne or more validation errors occurred.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold crm:write.
404application/problem+json, ProblemDetailsNo resource matches that id.
409application/problem+json, ProblemDetailsThe request conflicts with the current state of the order.
412application/problem+json, ProblemDetailsSomeone else changed this since you opened it. Reload and try again.
500application/problem+json, ProblemDetailsThe request failed.

200 response body

FieldTypeDescription
cancelReasonrequiredstring
cancelledAtstring (date-time) or null
clientIdrequiredstring
clientNamerequiredstring
closedAtstring (date-time) or null
customerPorequiredstring
depositBasisPointsrequiredinteger
depositCentsrequiredinteger

int64.

depositInvoiceIdstring or null
fulfilledAtstring (date-time) or null
invoiceModerequiredstring
linesrequiredarray of SoLineView
lines[].catalogItemIdstring or null
lines[].descriptionrequiredstring
lines[].discountBasisPointsrequiredinteger
lines[].fulfillablerequiredboolean
lines[].kindrequiredstring
lines[].positionrequiredinteger
lines[].publicIdrequiredstring
lines[].qtyCancelledrequiredstring
lines[].qtyFulfilledrequiredstring
lines[].qtyInvoicedrequiredstring
lines[].qtyOnOrderrequiredstring
lines[].quantityrequiredstring
lines[].rowVersionrequiredinteger

int64.

lines[].serializedrequiredboolean
lines[].stockItemIdstring or null
lines[].taxablerequiredboolean
lines[].unitrequiredstring
lines[].unitCostCentsrequiredinteger

int64.

lines[].unitPriceCentsrequiredinteger

int64.

notesrequiredstring
opportunityIdstring or null
opportunityNamestring or null
orderedAtrequiredstring (date-time)
originrequiredstring
ownerNamestring or null
ownerUserIdstring or null
publicIdrequiredstring
quoteIdstring or null
quoteNumberstring or null
rowVersionrequiredinteger

int64.

soNumberrequiredstring
statusrequiredstring
subtotalCentsrequiredinteger

int64.

taxCentsrequiredinteger

int64.

taxRateBasisPointsrequiredinteger
totalCentsrequiredinteger

int64.

Terminal window
# Sign in first. outpost_console is a session cookie, so send it with every request.
# This operation is idempotent. Repeating it does not repeat its effect.
curl -X POST 'https://depot.example.com/api/v1/sales/orders/<id>/cancel' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-b 'outpost_console=<console-session>' \
--data '{
"reason": "string"
}'

POSTcrm:writemsp facemspIdempotent

Source: [object Object]

closeOrder closes an order once everything has shipped or been cancelled.

NameInTypeRequiredDescription
idpathstringYesA uuid.
StatusBodyDescription
200application/json, SoViewSuccess.
400application/problem+json, ProblemDetailsOne or more validation errors occurred.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold crm:write.
404application/problem+json, ProblemDetailsNo resource matches that id.
409application/problem+json, ProblemDetailsThe request conflicts with the current state of the order.
412application/problem+json, ProblemDetailsSomeone else changed this since you opened it. Reload and try again.
500application/problem+json, ProblemDetailsThe request failed.

200 response body

FieldTypeDescription
cancelReasonrequiredstring
cancelledAtstring (date-time) or null
clientIdrequiredstring
clientNamerequiredstring
closedAtstring (date-time) or null
customerPorequiredstring
depositBasisPointsrequiredinteger
depositCentsrequiredinteger

int64.

depositInvoiceIdstring or null
fulfilledAtstring (date-time) or null
invoiceModerequiredstring
linesrequiredarray of SoLineView
lines[].catalogItemIdstring or null
lines[].descriptionrequiredstring
lines[].discountBasisPointsrequiredinteger
lines[].fulfillablerequiredboolean
lines[].kindrequiredstring
lines[].positionrequiredinteger
lines[].publicIdrequiredstring
lines[].qtyCancelledrequiredstring
lines[].qtyFulfilledrequiredstring
lines[].qtyInvoicedrequiredstring
lines[].qtyOnOrderrequiredstring
lines[].quantityrequiredstring
lines[].rowVersionrequiredinteger

int64.

lines[].serializedrequiredboolean
lines[].stockItemIdstring or null
lines[].taxablerequiredboolean
lines[].unitrequiredstring
lines[].unitCostCentsrequiredinteger

int64.

lines[].unitPriceCentsrequiredinteger

int64.

notesrequiredstring
opportunityIdstring or null
opportunityNamestring or null
orderedAtrequiredstring (date-time)
originrequiredstring
ownerNamestring or null
ownerUserIdstring or null
publicIdrequiredstring
quoteIdstring or null
quoteNumberstring or null
rowVersionrequiredinteger

int64.

soNumberrequiredstring
statusrequiredstring
subtotalCentsrequiredinteger

int64.

taxCentsrequiredinteger

int64.

taxRateBasisPointsrequiredinteger
totalCentsrequiredinteger

int64.

Terminal window
# Sign in first. outpost_console is a session cookie, so send it with every request.
# This operation is idempotent. Repeating it does not repeat its effect.
curl -X POST 'https://depot.example.com/api/v1/sales/orders/<id>/close' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-b 'outpost_console=<console-session>'

GETcrm:readmsp facemspIdempotent

Source: [object Object]

listOrderEvents answers the order’s timeline, newest first.

NameInTypeRequiredDescription
idpathstringYesA uuid.
StatusBodyDescription
200application/json, array of SoEventViewSuccess.
400application/problem+json, ProblemDetailsOne or more validation errors occurred.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold crm:read.
404application/problem+json, ProblemDetailsNo resource matches that id.
409application/problem+json, ProblemDetailsThe request conflicts with the current state of the order.
412application/problem+json, ProblemDetailsSomeone else changed this since you opened it. Reload and try again.
500application/problem+json, ProblemDetailsThe request failed.

200 response body

FieldTypeDescription
[].actorKindrequiredstring
[].actorNamestring or null
[].atrequiredstring (date-time)
[].detailsrequiredany

Arbitrary JSON.

[].kindrequiredstring
[].publicIdrequiredstring
Terminal window
# Sign in first. outpost_console is a session cookie, so send it with every request.
# This operation is idempotent. Repeating it does not repeat its effect.
curl -X GET 'https://depot.example.com/api/v1/sales/orders/<id>/events' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-b 'outpost_console=<console-session>'

GET /api/v1/sales/orders/{id}/fulfillments

Section titled “GET /api/v1/sales/orders/{id}/fulfillments”

GETcrm:readmsp facemspIdempotent

Source: [object Object]

listFulfillments answers the order’s delivery batches.

NameInTypeRequiredDescription
idpathstringYesA uuid.
StatusBodyDescription
200application/json, array of SoFulfillmentViewSuccess.
400application/problem+json, ProblemDetailsOne or more validation errors occurred.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold crm:read.
404application/problem+json, ProblemDetailsNo resource matches that id.
409application/problem+json, ProblemDetailsThe request conflicts with the current state of the order.
412application/problem+json, ProblemDetailsSomeone else changed this since you opened it. Reload and try again.
500application/problem+json, ProblemDetailsThe request failed.

200 response body

FieldTypeDescription
[].assetsMovedAtstring (date-time) or null
[].attemptsrequiredinteger
[].completedAtstring (date-time) or null
[].createdAtrequiredstring (date-time)
[].errorrequiredstring
[].invoiceIdstring or null
[].invoiceNumberstring or null
[].invoiceSkippedrequiredboolean
[].linesrequiredarray of SoFulfillmentLineView
[].lines[].assetIdsrequiredarray of string
[].lines[].descriptionrequiredstring
[].lines[].publicIdrequiredstring
[].lines[].qtyrequiredstring
[].lines[].salesOrderLineIdrequiredstring
[].lines[].sourceLocationIdstring or null
[].lines[].sourceLocationNamestring or null
[].lines[].unitCostCentsinteger or null

int64.

[].publicIdrequiredstring
[].receiptIdstring or null
[].requestedByNamestring or null
[].sourceKindrequiredstring
[].staterequiredstring
[].stockPostedAtstring (date-time) or null
Terminal window
# Sign in first. outpost_console is a session cookie, so send it with every request.
# This operation is idempotent. Repeating it does not repeat its effect.
curl -X GET 'https://depot.example.com/api/v1/sales/orders/<id>/fulfillments' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-b 'outpost_console=<console-session>'

POST /api/v1/sales/orders/{id}/fulfillments

Section titled “POST /api/v1/sales/orders/{id}/fulfillments”

POSTinventory:writemsp facemspIdempotentNot fully resolved

What this page does not know
  • response-status

These are parts of the route the extractor could not read from the source. Everything else on this page came straight from it.

Source: [object Object]

requestFulfillment queues a delivery batch from stock (idempotent by idempotencyKey: a repeat answers the first batch, 200).

so-fulfill posts the stock, moves the assets and raises the delivery invoice.

NameInTypeRequiredDescription
idpathstringYesA uuid.

Required, sent as application/json.

The body is any.

StatusBodyDescription
200application/json, SoFulfillmentViewSuccess.
400application/problem+json, ProblemDetailsOne or more validation errors occurred.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold inventory:write.
404application/problem+json, ProblemDetailsNo resource matches that id.
409application/problem+json, ProblemDetailsThe request conflicts with the current state of the order.
412application/problem+json, ProblemDetailsSomeone else changed this since you opened it. Reload and try again.
500application/problem+json, ProblemDetailsThe request failed.

200 response body

FieldTypeDescription
assetsMovedAtstring (date-time) or null
attemptsrequiredinteger
completedAtstring (date-time) or null
createdAtrequiredstring (date-time)
errorrequiredstring
invoiceIdstring or null
invoiceNumberstring or null
invoiceSkippedrequiredboolean
linesrequiredarray of SoFulfillmentLineView
lines[].assetIdsrequiredarray of string
lines[].descriptionrequiredstring
lines[].publicIdrequiredstring
lines[].qtyrequiredstring
lines[].salesOrderLineIdrequiredstring
lines[].sourceLocationIdstring or null
lines[].sourceLocationNamestring or null
lines[].unitCostCentsinteger or null

int64.

publicIdrequiredstring
receiptIdstring or null
requestedByNamestring or null
sourceKindrequiredstring
staterequiredstring
stockPostedAtstring (date-time) or null
Terminal window
# Sign in first. outpost_console is a session cookie, so send it with every request.
# This operation is idempotent. Repeating it does not repeat its effect.
curl -X POST 'https://depot.example.com/api/v1/sales/orders/<id>/fulfillments' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-b 'outpost_console=<console-session>' \
--data '"string"'

POST /api/v1/sales/orders/{id}/fulfillments/{fid}/retry

Section titled “POST /api/v1/sales/orders/{id}/fulfillments/{fid}/retry”

POSTinventory:writemsp facemspIdempotent

Source: [object Object]

retryFulfillment returns a failed batch to pending for so-fulfill.

NameInTypeRequiredDescription
fidpathstringYesA uuid.
idpathstringYesA uuid.
StatusBodyDescription
200application/json, SoFulfillmentViewSuccess.
400application/problem+json, ProblemDetailsOne or more validation errors occurred.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold inventory:write.
404application/problem+json, ProblemDetailsNo resource matches that id.
409application/problem+json, ProblemDetailsThe request conflicts with the current state of the order.
412application/problem+json, ProblemDetailsSomeone else changed this since you opened it. Reload and try again.
500application/problem+json, ProblemDetailsThe request failed.

200 response body

FieldTypeDescription
assetsMovedAtstring (date-time) or null
attemptsrequiredinteger
completedAtstring (date-time) or null
createdAtrequiredstring (date-time)
errorrequiredstring
invoiceIdstring or null
invoiceNumberstring or null
invoiceSkippedrequiredboolean
linesrequiredarray of SoFulfillmentLineView
lines[].assetIdsrequiredarray of string
lines[].descriptionrequiredstring
lines[].publicIdrequiredstring
lines[].qtyrequiredstring
lines[].salesOrderLineIdrequiredstring
lines[].sourceLocationIdstring or null
lines[].sourceLocationNamestring or null
lines[].unitCostCentsinteger or null

int64.

publicIdrequiredstring
receiptIdstring or null
requestedByNamestring or null
sourceKindrequiredstring
staterequiredstring
stockPostedAtstring (date-time) or null
Terminal window
# Sign in first. outpost_console is a session cookie, so send it with every request.
# This operation is idempotent. Repeating it does not repeat its effect.
curl -X POST 'https://depot.example.com/api/v1/sales/orders/<id>/fulfillments/<fid>/retry' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-b 'outpost_console=<console-session>'

GETcrm:readmsp facemspIdempotent

Source: [object Object]

listOrderInvoices answers every invoice line billed for the order.

NameInTypeRequiredDescription
idpathstringYesA uuid.
StatusBodyDescription
200application/json, array of SoInvoiceLinkViewSuccess.
400application/problem+json, ProblemDetailsOne or more validation errors occurred.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold crm:read.
404application/problem+json, ProblemDetailsNo resource matches that id.
409application/problem+json, ProblemDetailsThe request conflicts with the current state of the order.
412application/problem+json, ProblemDetailsSomeone else changed this since you opened it. Reload and try again.
500application/problem+json, ProblemDetailsThe request failed.

200 response body

FieldTypeDescription
[].amountCentsrequiredinteger

int64.

[].createdAtrequiredstring (date-time)
[].invoiceIdrequiredstring
[].invoiceNumberstring or null
[].invoiceStatusrequiredstring
[].kindrequiredstring
[].publicIdrequiredstring
[].qtystring or null
[].salesOrderLineIdstring or null
Terminal window
# Sign in first. outpost_console is a session cookie, so send it with every request.
# This operation is idempotent. Repeating it does not repeat its effect.
curl -X GET 'https://depot.example.com/api/v1/sales/orders/<id>/invoices' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-b 'outpost_console=<console-session>'

POSTcrm:writemsp facemsp

Source: [object Object]

addOrderLine adds one line to an open order.

NameInTypeRequiredDescription
idpathstringYesA uuid.

Required, sent as application/json.

The body is any.

StatusBodyDescription
201application/json, SoViewCreated.
400application/problem+json, ProblemDetailsOne or more validation errors occurred.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold crm:write.
404application/problem+json, ProblemDetailsNo resource matches that id.
409application/problem+json, ProblemDetailsThe request conflicts with the current state of the order.
412application/problem+json, ProblemDetailsSomeone else changed this since you opened it. Reload and try again.
500application/problem+json, ProblemDetailsThe request failed.

201 response body

FieldTypeDescription
cancelReasonrequiredstring
cancelledAtstring (date-time) or null
clientIdrequiredstring
clientNamerequiredstring
closedAtstring (date-time) or null
customerPorequiredstring
depositBasisPointsrequiredinteger
depositCentsrequiredinteger

int64.

depositInvoiceIdstring or null
fulfilledAtstring (date-time) or null
invoiceModerequiredstring
linesrequiredarray of SoLineView
lines[].catalogItemIdstring or null
lines[].descriptionrequiredstring
lines[].discountBasisPointsrequiredinteger
lines[].fulfillablerequiredboolean
lines[].kindrequiredstring
lines[].positionrequiredinteger
lines[].publicIdrequiredstring
lines[].qtyCancelledrequiredstring
lines[].qtyFulfilledrequiredstring
lines[].qtyInvoicedrequiredstring
lines[].qtyOnOrderrequiredstring
lines[].quantityrequiredstring
lines[].rowVersionrequiredinteger

int64.

lines[].serializedrequiredboolean
lines[].stockItemIdstring or null
lines[].taxablerequiredboolean
lines[].unitrequiredstring
lines[].unitCostCentsrequiredinteger

int64.

lines[].unitPriceCentsrequiredinteger

int64.

notesrequiredstring
opportunityIdstring or null
opportunityNamestring or null
orderedAtrequiredstring (date-time)
originrequiredstring
ownerNamestring or null
ownerUserIdstring or null
publicIdrequiredstring
quoteIdstring or null
quoteNumberstring or null
rowVersionrequiredinteger

int64.

soNumberrequiredstring
statusrequiredstring
subtotalCentsrequiredinteger

int64.

taxCentsrequiredinteger

int64.

taxRateBasisPointsrequiredinteger
totalCentsrequiredinteger

int64.

Terminal window
# Sign in first. outpost_console is a session cookie, so send it with every request.
curl -X POST 'https://depot.example.com/api/v1/sales/orders/<id>/lines' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-b 'outpost_console=<console-session>' \
--data '"string"'

PATCH /api/v1/sales/orders/{id}/lines/{lineId}

Section titled “PATCH /api/v1/sales/orders/{id}/lines/{lineId}”

PATCHcrm:writemsp facemspIdempotent

Source: [object Object]

patchOrderLine edits one line; the quantity cannot drop below what is fulfilled, cancelled, being shipped or invoiced (409 quantityBelowFulfilled).

NameInTypeRequiredDescription
idpathstringYesA uuid.
lineIdpathstringYes

Required, sent as application/json.

The body is any.

StatusBodyDescription
200application/json, SoViewSuccess.
400application/problem+json, ProblemDetailsOne or more validation errors occurred.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold crm:write.
404application/problem+json, ProblemDetailsNo resource matches that id.
409application/problem+json, ProblemDetailsThe request conflicts with the current state of the order.
412application/problem+json, ProblemDetailsSomeone else changed this since you opened it. Reload and try again.
500application/problem+json, ProblemDetailsThe request failed.

200 response body

FieldTypeDescription
cancelReasonrequiredstring
cancelledAtstring (date-time) or null
clientIdrequiredstring
clientNamerequiredstring
closedAtstring (date-time) or null
customerPorequiredstring
depositBasisPointsrequiredinteger
depositCentsrequiredinteger

int64.

depositInvoiceIdstring or null
fulfilledAtstring (date-time) or null
invoiceModerequiredstring
linesrequiredarray of SoLineView
lines[].catalogItemIdstring or null
lines[].descriptionrequiredstring
lines[].discountBasisPointsrequiredinteger
lines[].fulfillablerequiredboolean
lines[].kindrequiredstring
lines[].positionrequiredinteger
lines[].publicIdrequiredstring
lines[].qtyCancelledrequiredstring
lines[].qtyFulfilledrequiredstring
lines[].qtyInvoicedrequiredstring
lines[].qtyOnOrderrequiredstring
lines[].quantityrequiredstring
lines[].rowVersionrequiredinteger

int64.

lines[].serializedrequiredboolean
lines[].stockItemIdstring or null
lines[].taxablerequiredboolean
lines[].unitrequiredstring
lines[].unitCostCentsrequiredinteger

int64.

lines[].unitPriceCentsrequiredinteger

int64.

notesrequiredstring
opportunityIdstring or null
opportunityNamestring or null
orderedAtrequiredstring (date-time)
originrequiredstring
ownerNamestring or null
ownerUserIdstring or null
publicIdrequiredstring
quoteIdstring or null
quoteNumberstring or null
rowVersionrequiredinteger

int64.

soNumberrequiredstring
statusrequiredstring
subtotalCentsrequiredinteger

int64.

taxCentsrequiredinteger

int64.

taxRateBasisPointsrequiredinteger
totalCentsrequiredinteger

int64.

Terminal window
# Sign in first. outpost_console is a session cookie, so send it with every request.
# This operation is idempotent. Repeating it does not repeat its effect.
curl -X PATCH 'https://depot.example.com/api/v1/sales/orders/<id>/lines/<lineId>' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-b 'outpost_console=<console-session>' \
--data '"string"'

POST /api/v1/sales/orders/{id}/lines/{lineId}/cancel

Section titled “POST /api/v1/sales/orders/{id}/lines/{lineId}/cancel”

POSTcrm:writemsp facemspIdempotent

Source: [object Object]

cancelOrderLine cancels part or all of a line’s open quantity.

NameInTypeRequiredDescription
idpathstringYesA uuid.
lineIdpathstringYes

Required, sent as application/json.

The body is any.

StatusBodyDescription
200application/json, SoViewSuccess.
400application/problem+json, ProblemDetailsOne or more validation errors occurred.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold crm:write.
404application/problem+json, ProblemDetailsNo resource matches that id.
409application/problem+json, ProblemDetailsThe request conflicts with the current state of the order.
412application/problem+json, ProblemDetailsSomeone else changed this since you opened it. Reload and try again.
500application/problem+json, ProblemDetailsThe request failed.

200 response body

FieldTypeDescription
cancelReasonrequiredstring
cancelledAtstring (date-time) or null
clientIdrequiredstring
clientNamerequiredstring
closedAtstring (date-time) or null
customerPorequiredstring
depositBasisPointsrequiredinteger
depositCentsrequiredinteger

int64.

depositInvoiceIdstring or null
fulfilledAtstring (date-time) or null
invoiceModerequiredstring
linesrequiredarray of SoLineView
lines[].catalogItemIdstring or null
lines[].descriptionrequiredstring
lines[].discountBasisPointsrequiredinteger
lines[].fulfillablerequiredboolean
lines[].kindrequiredstring
lines[].positionrequiredinteger
lines[].publicIdrequiredstring
lines[].qtyCancelledrequiredstring
lines[].qtyFulfilledrequiredstring
lines[].qtyInvoicedrequiredstring
lines[].qtyOnOrderrequiredstring
lines[].quantityrequiredstring
lines[].rowVersionrequiredinteger

int64.

lines[].serializedrequiredboolean
lines[].stockItemIdstring or null
lines[].taxablerequiredboolean
lines[].unitrequiredstring
lines[].unitCostCentsrequiredinteger

int64.

lines[].unitPriceCentsrequiredinteger

int64.

notesrequiredstring
opportunityIdstring or null
opportunityNamestring or null
orderedAtrequiredstring (date-time)
originrequiredstring
ownerNamestring or null
ownerUserIdstring or null
publicIdrequiredstring
quoteIdstring or null
quoteNumberstring or null
rowVersionrequiredinteger

int64.

soNumberrequiredstring
statusrequiredstring
subtotalCentsrequiredinteger

int64.

taxCentsrequiredinteger

int64.

taxRateBasisPointsrequiredinteger
totalCentsrequiredinteger

int64.

Terminal window
# Sign in first. outpost_console is a session cookie, so send it with every request.
# This operation is idempotent. Repeating it does not repeat its effect.
curl -X POST 'https://depot.example.com/api/v1/sales/orders/<id>/lines/<lineId>/cancel' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-b 'outpost_console=<console-session>' \
--data '"string"'

GETcrm:readmsp facemspIdempotent

Source: [object Object]

orderMargin computes the order’s margin at read time (ruling P3): revenue from its invoice links, cost from what was bought for it (received plus landed, else ordered), else what shipped from stock at its average, else the quoted cost.

NameInTypeRequiredDescription
idpathstringYesA uuid.
StatusBodyDescription
200application/json, SoMarginViewSuccess.
400application/problem+json, ProblemDetailsOne or more validation errors occurred.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold crm:read.
404application/problem+json, ProblemDetailsNo resource matches that id.
409application/problem+json, ProblemDetailsThe request conflicts with the current state of the order.
412application/problem+json, ProblemDetailsSomeone else changed this since you opened it. Reload and try again.
500application/problem+json, ProblemDetailsThe request failed.

200 response body

FieldTypeDescription
costCentsrequiredinteger

int64.

expectedCostCentsrequiredinteger

int64.

expectedMarginBasisPointsinteger or null
expectedMarginCentsrequiredinteger

int64.

expectedRevenueCentsrequiredinteger

int64.

linesrequiredarray of SoMarginLineView
lines[].costBasisrequiredstring
lines[].costCentsrequiredinteger

int64.

lines[].descriptionrequiredstring
lines[].expectedCostCentsrequiredinteger

int64.

lines[].expectedRevenueCentsrequiredinteger

int64.

lines[].revenueCentsrequiredinteger

int64.

lines[].salesOrderLineIdrequiredstring
marginBasisPointsinteger or null
marginCentsrequiredinteger

int64.

revenueCentsrequiredinteger

int64.

Terminal window
# Sign in first. outpost_console is a session cookie, so send it with every request.
# This operation is idempotent. Repeating it does not repeat its effect.
curl -X GET 'https://depot.example.com/api/v1/sales/orders/<id>/margin' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-b 'outpost_console=<console-session>'

POSTprocurement:writemsp facemsp

Source: [object Object]

purchaseForOrder raises draft purchase orders for the order’s goods, one per supplier and ship-to (our default stock location, or drop-shipped to the client).

Each PO line carries the SO and SO line it was bought for, which is what receiving, drop-ship fulfillment and margin follow.

NameInTypeRequiredDescription
idpathstringYesA uuid.

Required, sent as application/json.

The body is any.

StatusBodyDescription
201application/json, objectCreated.
400application/problem+json, ProblemDetailsOne or more validation errors occurred.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold procurement:write.
404application/problem+json, ProblemDetailsNo resource matches that id.
409application/problem+json, ProblemDetailsThe request conflicts with the current state of the order.
412application/problem+json, ProblemDetailsSomeone else changed this since you opened it. Reload and try again.
500application/problem+json, ProblemDetailsThe request failed.
503application/problem+json, ProblemDetailsThe practice database is not available.
Terminal window
# Sign in first. outpost_console is a session cookie, so send it with every request.
curl -X POST 'https://depot.example.com/api/v1/sales/orders/<id>/purchase' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-b 'outpost_console=<console-session>' \
--data '"string"'

GETprocurement:readmsp facemspIdempotent

Source: [object Object]

listOrderPurchases answers the purchase orders raised for this order.

NameInTypeRequiredDescription
idpathstringYesA uuid.
StatusBodyDescription
200application/json, array of SoPurchaseOrderViewSuccess.
400application/problem+json, ProblemDetailsOne or more validation errors occurred.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold procurement:read.
404application/problem+json, ProblemDetailsNo resource matches that id.
409application/problem+json, ProblemDetailsThe request conflicts with the current state of the order.
412application/problem+json, ProblemDetailsSomeone else changed this since you opened it. Reload and try again.
500application/problem+json, ProblemDetailsThe request failed.
503application/problem+json, ProblemDetailsThe practice database is not available.

200 response body

FieldTypeDescription
[].createdAtrequiredstring (date-time)
[].dropShipClientIdstring or null
[].dropShipClientNamestring or null
[].expectedOnstring or null
[].locationIdstring or null
[].locationNamestring or null
[].originrequiredstring
[].poNumberrequiredstring
[].publicIdrequiredstring
[].shipToKindrequiredstring
[].statusrequiredstring
[].submissionStaterequiredstring
[].supplierIdrequiredstring
[].supplierNamerequiredstring
[].totalCentsrequiredinteger

int64.

[].updatedAtrequiredstring (date-time)
Terminal window
# Sign in first. outpost_console is a session cookie, so send it with every request.
# This operation is idempotent. Repeating it does not repeat its effect.
curl -X GET 'https://depot.example.com/api/v1/sales/orders/<id>/purchases' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-b 'outpost_console=<console-session>'

Content is licensed CC BY 4.0. Code samples are MIT. Outpost and the Outpost mark are trademarks of Outpost Business Solutions, PBC and are not covered by either license.