Skip to content
Taylorz CRM Developers
Esc
↑↓navigate↵open⌘Jpreview

List a product's purchase costs

The purchase history cost-driven pricing methods compute from.

GET/api/v1/products/{id}/purchase-costs
Authorization
AuthorizationOAuth2 access token · headerrequired

Authorization-code grant with PKCE. Clients are public and hold no secret. Discovery is published at /.well-known/oauth-authorization-server/api/auth.

Scopes:api.access
Path parameters
idstringrequired

A product's id

min length 1 · max length 255
Responses
200

The product's purchase costs

Array of PurchaseCost
createdAtstring<date-time>required
matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
currencystringrequired
matches ^[A-Z]{3}$
idstringrequired
min length 1 · max length 255
organizationIdstringrequired
min length 1 · max length 255
productIdstringrequired
min length 1 · max length 255
purchasedOnstring<date>required
matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
referencestringrequired
supplierRecordIdstring | nullrequired
Show properties
Any of:
string
string
null
null
unitCoststringrequired
matches ^-?(?:0|[1-9]\d{0,15})(?:\.\d{1,8})?$
400

The request body, query or parameters were refused

codestringrequired
Allowed:invalid_inputnot_foundconflictforbidden
detailany
errorstringrequired
reasonstring
401

The access token is missing, invalid or revoked

errorstringrequired
403

The tenant's module is off, or the token's scope or the member's role does not permit the action

codestringrequired
Allowed:invalid_inputnot_foundconflictforbidden
detailany
errorstringrequired
reasonstring
404

No such record, or none the caller may read

codestringrequired
Allowed:invalid_inputnot_foundconflictforbidden
detailany
errorstringrequired
reasonstring
413

The request exceeds the route's body limit

errorstringrequired
500

An unexpected failure

errorstringrequired
Request
curl -X GET '/api/v1/api/v1/products/string/purchase-costs' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Accept: application/json'
Response
[
  {
    "createdAt": "2019-08-24T14:15:22Z",
    "currency": "string",
    "id": "string",
    "organizationId": "string",
    "productId": "string",
    "purchasedOn": "2019-08-24",
    "reference": "string",
    "supplierRecordId": "string",
    "unitCost": "string"
  }
]

Was this page helpful?