Products
What you sell, and what you keep on the shelf. Prices come back as decimal strings, so they arrive with their cents intact.
What you can do
- get List products /api/public/v1/products
Read your catalog out - to price a storefront, fill a quoting tool, or check what's on the shelf from somewhere else.
- get Get one product /api/public/v1/products/{id}
Fetch a single product by id, when you already know which one you want.
- post Create a product /api/public/v1/products
Add something to your catalog from your own system rather than by hand.
- patch Update a product /api/public/v1/products/{id}
Change a price, a description, or anything else you sent. Send only what changes; the rest stays as it was.
- delete Delete a product /api/public/v1/products/{id}
Remove a product you added in error.
Fields
61 in total: 58 you set, 3 we keep. Every one of them can come back empty, so read defensively rather than assuming a value is there.
| Field | Type | Written by |
|---|---|---|
| id | string | us |
| createdAt | string | us |
| updatedAt | string | us |
| name | string | you |
| description | string | you |
| productNumber | string | you |
| articleCode | string | you |
| ean | string | you |
| upcCode | string | you |
| hsnCode | string | you |
| brand | string | you |
| model | string | you |
| type | string | you |
| version | string | you |
| remark | string | you |
| infoUrl | string | you |
| serialNumber | string | you |
| labels | string | you |
| tags | array | you |
| categoryId | string | you |
| unitId | string | you |
| status | string | you |
| isInactive | boolean | you |
| isSaleItem | boolean | you |
| isPurchaseItem | boolean | you |
| isStockItem | boolean | you |
| isCatalogItem | boolean | you |
| isWebShop | boolean | you |
| isFeaturedProduct | boolean | you |
| stockProductType | string | you |
| validFrom | string | you |
| validTo | string | you |
| salePrice | string money | you |
| saleRrpPrice | string money | you |
| salePriceIncludesTax | boolean | you |
| salePriceDecimals | integer | you |
| saleTaxCode | string | you |
| saleTaxStatus | string | you |
| isSaleIndividual | boolean | you |
| isShippingRequired | boolean | you |
| isShippingTaxable | boolean | you |
| saleLedgerAccountCode | string | you |
| purchaseLedgerAccountCode | string | you |
| stockLedgerAccountCode | string | you |
| cogsLedgerAccountCode | string | you |
| stockQuantity | number | you |
| stockMinimalQuantity | number | you |
| stockLocation | string | you |
| quantityDefault | number | you |
| quantityBackorder | number | you |
| stockDescription | string | you |
| stockDocumentTypes | array | you |
| color | string | you |
| diameter | string | you |
| depth | string | you |
| height | string | you |
| length | string | you |
| opening | string | you |
| width | string | you |
| volume | string | you |
| weight | string | you |
Fields marked money come back as decimal
strings like "1234.5600". Keep
the string, or hand it to something that does decimal arithmetic.
The shape it comes back in
Generated from the contract - every field, nothing invented. The values are type names rather than a real record, because we won't put made-up data on a page.
{
"id": "string",
"createdAt": "string",
"updatedAt": "string",
"name": "string",
"description": "string",
"productNumber": "string",
"articleCode": "string",
"ean": "string",
"upcCode": "string",
"hsnCode": "string",
"brand": "string",
"model": "string",
"type": "string",
"version": "string",
"remark": "string",
"infoUrl": "string",
"serialNumber": "string",
"labels": "string",
"tags": [],
"categoryId": "string",
"unitId": "string",
"status": "string",
"isInactive": false,
"isSaleItem": false,
"isPurchaseItem": false,
"isStockItem": false,
"isCatalogItem": false,
"isWebShop": false,
"isFeaturedProduct": false,
"stockProductType": "string",
"validFrom": "string",
"validTo": "string",
"salePrice": "decimal string",
"saleRrpPrice": "decimal string",
"salePriceIncludesTax": false,
"salePriceDecimals": 0,
"saleTaxCode": "string",
"saleTaxStatus": "string",
"isSaleIndividual": false,
"isShippingRequired": false,
"isShippingTaxable": false,
"saleLedgerAccountCode": "string",
"purchaseLedgerAccountCode": "string",
"stockLedgerAccountCode": "string",
"cogsLedgerAccountCode": "string",
"stockQuantity": 0,
"stockMinimalQuantity": 0,
"stockLocation": "string",
"quantityDefault": 0,
"quantityBackorder": 0,
"stockDescription": "string",
"stockDocumentTypes": [],
"color": "string",
"diameter": "string",
"depth": "string",
"height": "string",
"length": "string",
"opening": "string",
"width": "string",
"volume": "string",
"weight": "string"
} What's deliberately not here
This is a smaller list than what you'd see on the screen inside ObraLedger, and that's on purpose. Anything we publish becomes a promise we have to keep, and taking a field away later breaks whatever you built on it. Adding one doesn't. So the list starts narrow and grows when somebody needs it.
If something you need is missing, tell us what you're building. That's what shapes the order these get added in.
Base URL https://app.obraledger.com.
Building something and stuck? Tell us - we'd rather hear it than have you guess.