GoSmarter Logo
GoSmarter API Gateway

List orders

GET
https://api.gosmarter.ai
/api/company/{companyId}/orders-slim

Retrieves a list of all orders for a company

List orders › path Parameters

companyId
​string · uuid · required

The unique identifier of the company. Example: 11111111-2222-3333-4444-555555555555

List orders › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

List orders › Responses

Orders list retrieved successfully

createdAt
​string · date-time
updatedAt
​string · date-time
orderReference
​string
quantity
​integer · int32
orderDate
​string · date-time
deliveryDate
​string · date-time
site
​string
status
​string
active
​boolean
relatedOrganisationId
​string · uuid
customerName
​string
​orderLineItemDto[]
orderId
​string · uuid
companyId
​string · uuid

Update orders with nested line items

PUT
https://api.gosmarter.ai
/api/company/{companyId}/orders-slim

Updates one or more existing orders for a company. Each order includes nested line items array. Frontend sends complete structure with GUIDs. Line items not in the request will be soft-deleted.

Update orders with nested line items › path Parameters

companyId
​string · uuid · required

The unique identifier of the company. Example: 11111111-2222-3333-4444-555555555555

Update orders with nested line items › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Update orders with nested line items › Request Body

orderReference
​string
quantity
​integer · int32
orderDate
​string · date-time
deliveryDate
​string · date-time
site
​string
status
​string
active
​boolean
relatedOrganisationId
​string · uuid
customerName
​string
​orderLineItemDto[]
orderId
​string · uuid
companyId
​string · uuid

Update orders with nested line items › Responses

Orders updated successfully with enriched customer names

orderReference
​string
quantity
​integer · int32
orderDate
​string · date-time
deliveryDate
​string · date-time
site
​string
status
​string
active
​boolean
relatedOrganisationId
​string · uuid
customerName
​string
​orderLineItemDto[]
orderId
​string · uuid
companyId
​string · uuid

Create orders with optional line items

POST
https://api.gosmarter.ai
/api/company/{companyId}/orders-slim

Creates one or more new orders for a company. Each order can include an optional array of line items that will be created atomically with the order.

Create orders with optional line items › path Parameters

companyId
​string · uuid · required

The unique identifier of the company. Example: 11111111-2222-3333-4444-555555555555

Create orders with optional line items › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Create orders with optional line items › Request Body

orderReference
​string
quantity
​integer · int32
orderDate
​string · date-time
deliveryDate
​string · date-time
site
​string
status
​string
active
​boolean
relatedOrganisationId
​string · uuid
customerName
​string
​orderLineItemDto[]
orderId
​string · uuid
companyId
​string · uuid

Create orders with optional line items › Responses

Orders and line items created successfully with enriched customer names

orderReference
​string
quantity
​integer · int32
orderDate
​string · date-time
deliveryDate
​string · date-time
site
​string
status
​string
active
​boolean
relatedOrganisationId
​string · uuid
customerName
​string
​orderLineItemDto[]
orderId
​string · uuid
companyId
​string · uuid

Delete orders

DELETE
https://api.gosmarter.ai
/api/company/{companyId}/orders-slim

Soft deletes one or more orders and their line items by setting Active = 0. Temporal tables preserve the previous row state automatically.

Delete orders › path Parameters

companyId
​string · uuid · required

The unique identifier of the company

Delete orders › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Delete orders › Request Body

​string[]

Delete orders › Responses

Orders deleted successfully

deletedCount
​integer · int32

Number of items deleted

deletedIds
​string[]

List of IDs that were deleted


Download orders as CSV

GET
https://api.gosmarter.ai
/api/company/{companyId}/orders-slim/download

Downloads all orders for a company as a CSV file

Download orders as CSV › path Parameters

companyId
​string · uuid · required

The unique identifier of the company. Example: 11111111-2222-3333-4444-555555555555

Download orders as CSV › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Download orders as CSV › Responses

CSV file with order data

string · binary

Download orders + line items (ZIP)

GET
https://api.gosmarter.ai
/api/company/{companyId}/orders-slim/download-data

Downloads a ZIP file containing two CSV files: orders.csv and order-line-items.csv

Download orders + line items (ZIP) › path Parameters

companyId
​string · uuid · required

The unique identifier of the company

Download orders + line items (ZIP) › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Download orders + line items (ZIP) › Responses

ZIP file containing orders.csv and order-line-items.csv

string · binary

Generate or retrieve order certificate pack PDF

POST
https://api.gosmarter.ai
/api/company/{companyId}/orders-slim/{orderId}/certificate-pack/generate

Generates a certificate pack PDF for an order. Returns cached pack if data is unchanged since last generation.

Generate or retrieve order certificate pack PDF › path Parameters

companyId
​string · uuid · required
orderId
​string · uuid · required

Generate or retrieve order certificate pack PDF › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Generate or retrieve order certificate pack PDF › Responses

Certificate pack PDF

string · binary

Generate order supplier certificate pack PDF

POST
https://api.gosmarter.ai
/api/company/{companyId}/orders-slim/{orderId}/supplier-pack/generate

Generates a supplier-facing certificate pack PDF for an order: a cover/BOM page followed by, for each certified item, a section header page and the original mill certification pages stamped with a traceability watermark (and approval stamp, when reviewed). Always regenerated — never cached.

Generate order supplier certificate pack PDF › path Parameters

companyId
​string · uuid · required
orderId
​string · uuid · required

Generate order supplier certificate pack PDF › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Generate order supplier certificate pack PDF › Responses

Supplier certificate pack PDF

string · binary

Get an order by ID with nested line items

GET
https://api.gosmarter.ai
/api/company/{companyId}/orders-slim/{orderId}

Retrieves a single order by its unique ID within the specified company, including all associated line items.

Get an order by ID with nested line items › path Parameters

companyId
​string · uuid · required

The unique identifier of the company. Example: 11111111-2222-3333-4444-555555555555

orderId
​string · uuid · required

The unique identifier of the order. Example: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee

Get an order by ID with nested line items › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Get an order by ID with nested line items › Responses

Order retrieved successfully with nested line items

createdAt
​string · date-time
updatedAt
​string · date-time
orderReference
​string
quantity
​integer · int32
orderDate
​string · date-time
deliveryDate
​string · date-time
site
​string
status
​string
active
​boolean
relatedOrganisationId
​string · uuid
customerName
​string
​orderLineItemDto[]
orderId
​string · uuid
companyId
​string · uuid

Get order details with line items

GET
https://api.gosmarter.ai
/api/company/{companyId}/orders-slim/{orderId}/details

Retrieves a single order with all its line items by order ID within the specified company.

Get order details with line items › path Parameters

companyId
​string · uuid · required

The unique identifier of the company.

orderId
​string · uuid · required

The unique identifier of the order.

Get order details with line items › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Get order details with line items › Responses

Order details with line items retrieved successfully

orderId
​string · uuid
companyId
​string · uuid
orderReference
​string
quantity
​integer · int32
orderDate
​string · date-time
deliveryDate
​string · date-time
site
​string
status
​string
active
​boolean
relatedOrganisationId
​string · uuid
customerName
​string
createdAt
​string · date-time
updatedAt
​string · date-time
​orderLineItemDto[]
​orderLineItemDto[]

Get order change history

GET
https://api.gosmarter.ai
/api/company/{companyId}/orders-slim/{orderId}/history

Returns field-level audit history for a specific order and its line items, derived from SQL Server temporal tables. Events from order header and line items are interleaved in a single chronological timeline.

Get order change history › path Parameters

companyId
​string · uuid · required

The unique identifier of the company

orderId
​string · uuid · required

The unique identifier of the order

Get order change history › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Get order change history › Responses

Interleaved audit events for the order and its line items

changedAt
​string · date-time
changedById
​string · uuid
changedByName
​string
changeType
​string
entityType
​string
entityLabel
​string

List deleted orders

GET
https://api.gosmarter.ai
/api/company/{companyId}/orders-slim/deleted

Retrieves a list of all soft-deleted orders for a company (Active = 0)

List deleted orders › path Parameters

companyId
​string · uuid · required

The unique identifier of the company. Example: 11111111-2222-3333-4444-555555555555

List deleted orders › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

List deleted orders › Responses

Deleted orders list retrieved successfully

createdAt
​string · date-time
updatedAt
​string · date-time
orderReference
​string
quantity
​integer · int32
orderDate
​string · date-time
deliveryDate
​string · date-time
site
​string
status
​string
active
​boolean
relatedOrganisationId
​string · uuid
customerName
​string
​orderLineItemDto[]
orderId
​string · uuid
companyId
​string · uuid

Reserve inventory for an order line item

POST
https://api.gosmarter.ai
/api/company/{companyId}/orders/{orderId}/line-items/{lineItemId}/reserve

Atomically reserves inventory stock against an order line item. When split=true, creates a new inventory row with the reserved quantity and appends the order reference to its name.

Reserve inventory for an order line item › path Parameters

companyId
​string · uuid · required

The unique identifier of the company.

orderId
​string · uuid · required

The unique identifier of the order.

lineItemId
​string · uuid · required

The unique identifier of the order line item.

Reserve inventory for an order line item › query Parameters

inventoryId
​string · uuid · required

The inventory item to reserve.

reserveQuantity
​integer · int32 · required

The quantity to reserve.

split
​integer · int32 · required

When 1, splits the inventory item creating a new row with the reserved quantity. When 0, reserves the whole item (reserveQuantity must equal the full quantity). The underlying SQL parameter is a BIT — callers must pass 1 or 0.

Reserve inventory for an order line item › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Reserve inventory for an order line item › Responses

Reservation successful

linkedInventoryId
​string · uuid
originalInventoryId
​string · uuid
wasSplit
​boolean
orderLineItemId
​string · uuid

Restore deleted orders

POST
https://api.gosmarter.ai
/api/company/{companyId}/orders-slim/restore

Restores one or more soft-deleted orders and their line items by setting Active = 1.

Restore deleted orders › path Parameters

companyId
​string · uuid · required

The unique identifier of the company owning the entries

Restore deleted orders › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Restore deleted orders › Request Body

​string[]

Restore deleted orders › Responses

Orders restored successfully

deletedCount
​integer · int32

Number of items deleted

deletedIds
​string[]

List of IDs that were deleted


Submit a quality review for an order line item

POST
https://api.gosmarter.ai
/api/company/{companyId}/order-line-items/{orderLineItemId}/links/{inventoryId}/quality-review

Submits or updates a quality review decision for an order line item / inventory link. Pass reviewStatus: null to reset the review back to Pending.

Submit a quality review for an order line item › path Parameters

companyId
​string · uuid · required

The unique identifier of the company

orderLineItemId
​string · uuid · required

The unique identifier of the order line item

inventoryId
​string · uuid · required

The unique identifier of the linked inventory item

Submit a quality review for an order line item › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Submit a quality review for an order line item › Request Body

reviewStatus
​integer · int32
comment
​string
overriddenTagIds
​string[]

Tag IDs the reviewer is explicitly overriding (required if any Block-severity tag is present when approving)

Submit a quality review for an order line item › Responses

Review submitted successfully

orderLineItemId
​string · uuid
inventoryId
​string · uuid
reviewStatus
​integer · int32
reviewStatusLabel
​string
reviewComment
​string
reviewedByName
​string
reviewedAt
​string · date-time
message
​string

Unreserve inventory from an order line item

DELETE
https://api.gosmarter.ai
/api/company/{companyId}/orders/{orderId}/line-items/{lineItemId}/reserve/{inventoryId}

Removes the traceability link between an order line item and an inventory item. Does not undo any inventory split.

Unreserve inventory from an order line item › path Parameters

companyId
​string · uuid · required

The unique identifier of the company.

orderId
​string · uuid · required

The unique identifier of the order.

lineItemId
​string · uuid · required

The unique identifier of the order line item.

inventoryId
​string · uuid · required

The inventory item to unreserve.

Unreserve inventory from an order line item › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Unreserve inventory from an order line item › Responses

Unreservation successful, returns details of the removed reservation link

linkId
​string · uuid
companyId
​string · uuid
orderLineItemId
​string · uuid
inventoryId
​string · uuid

Upload orders and/or line items

POST
https://api.gosmarter.ai
/api/company/{companyId}/orders-slim/upload-combined

Uploads and processes up to two CSV files (orders and/or order line items). The endpoint identifies which file is which by inspecting the CSV header columns (not by the uploaded form field name). At least one file is required. Line items can link to orders via OrderId or OrderReference.

Upload orders and/or line items › path Parameters

companyId
​string · uuid · required

The unique identifier of the company

Upload orders and/or line items › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Upload orders and/or line items › Request Body

Upload orders and/or line items › Responses

CSVs uploaded and processed successfully


Get CSV upload templates (ZIP)

GET
https://api.gosmarter.ai
/api/company/{companyId}/orders-slim/upload-template

Downloads a ZIP file containing CSV templates for both orders and order line items. Upload orders first, then use the same OrderReference values to link line items.

Get CSV upload templates (ZIP) › path Parameters

companyId
​string · uuid · required

The unique identifier of the company. Example: 11111111-2222-3333-4444-555555555555

Get CSV upload templates (ZIP) › Headers

GoSmarter-Api-Key
​string · required

The GoSmarter-Api-Key header is used to authenticate with the API using your API key. Value is of the format YOUR_KEY_HERE.

Get CSV upload templates (ZIP) › Responses

ZIP file containing orders-template.csv and order-line-items-template.csv

string · binary