GoSmarter Logo
GoSmarter API Gateway

List all scrap log entries

GET
https://api.gosmarter.ai
/api/company/{companyId}/scrap-log

Retrieves all scrap log entries for the specified company, filtered by active status, ordered by log date descending.

List all scrap log entries › path Parameters

companyId
​string · uuid · required

The unique identifier of the company

List all scrap log entries › query Parameters

active
​boolean

Filter by active status (true = active items, false = deleted items). Defaults to true.

List all scrap log entries › 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 all scrap log entries › Responses

List of scrap log entries retrieved successfully

loggedByName
​string

Display name of the user who logged this entry

scrapLogId
​string · uuid

Unique identifier for the scrap log entry

companyId
​string · uuid

Identifier of the owning company

logDate
​string · date-time

Date when the scrap was logged

binSkipReference
​string

Bin or skip reference identifier

startingWeight
​number · double

Starting weight in kilograms

closingWeight
​number · double

Closing weight in kilograms

netWeight
​number · double

Net weight (calculated as ClosingWeight - StartingWeight) in kilograms

loggedBy
​string · uuid

User ID of the person who logged this entry

createdAt
​string · date-time

Timestamp when the record was created (UTC)

updatedAt
​string · date-time

Timestamp when the record was last updated (UTC)

active
​boolean

Soft delete flag (true = active, false = deleted)


Update existing scrap log entries

PUT
https://api.gosmarter.ai
/api/company/{companyId}/scrap-log

Updates one or more existing scrap log entries. Each entry must belong to the specified company. Field-level change history is recorded automatically via temporal tables.

Update existing scrap log entries › path Parameters

companyId
​string · uuid · required

The unique identifier of the company

Update existing scrap log entries › 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 existing scrap log entries › Request Body

scrapLogId
​string · uuid
logDate
​string · date-time
binSkipReference
​string
startingWeight
​number · double
closingWeight
​number · double

Update existing scrap log entries › Responses

Scrap log entries updated successfully

loggedByName
​string

Display name of the user who logged this entry

scrapLogId
​string · uuid

Unique identifier for the scrap log entry

companyId
​string · uuid

Identifier of the owning company

logDate
​string · date-time

Date when the scrap was logged

binSkipReference
​string

Bin or skip reference identifier

startingWeight
​number · double

Starting weight in kilograms

closingWeight
​number · double

Closing weight in kilograms

netWeight
​number · double

Net weight (calculated as ClosingWeight - StartingWeight) in kilograms

loggedBy
​string · uuid

User ID of the person who logged this entry

createdAt
​string · date-time

Timestamp when the record was created (UTC)

updatedAt
​string · date-time

Timestamp when the record was last updated (UTC)

active
​boolean

Soft delete flag (true = active, false = deleted)


Create new scrap log entries

POST
https://api.gosmarter.ai
/api/company/{companyId}/scrap-log

Creates one or more new scrap log entries for the specified company. Each entry will be associated with the companyId provided in the route and the current authenticated user.

Create new scrap log entries › path Parameters

companyId
​string · uuid · required

The unique identifier of the company

Create new scrap log entries › 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 new scrap log entries › Request Body

logDate
​string · date-time
binSkipReference
​string
startingWeight
​number · double
closingWeight
​number · double
loggedBy
​string · uuid

Create new scrap log entries › Responses

Scrap log entries created successfully

scrapLogId
​string · uuid

Unique identifier for the scrap log entry

companyId
​string · uuid

Identifier of the owning company

logDate
​string · date-time

Date when the scrap was logged

binSkipReference
​string

Bin or skip reference identifier

startingWeight
​number · double

Starting weight in kilograms

closingWeight
​number · double

Closing weight in kilograms

netWeight
​number · double

Net weight (calculated as ClosingWeight - StartingWeight) in kilograms

loggedBy
​string · uuid

User ID of the person who logged this entry

createdAt
​string · date-time

Timestamp when the record was created (UTC)

updatedAt
​string · date-time

Timestamp when the record was last updated (UTC)

active
​boolean

Soft delete flag (true = active, false = deleted)


Delete scrap log entries

DELETE
https://api.gosmarter.ai
/api/company/{companyId}/scrap-log

Soft deletes one or more scrap log entries by setting Active = 0. Temporal tables preserve the previous row state automatically.

Delete scrap log entries › path Parameters

companyId
​string · uuid · required

The unique identifier of the company owning the entries

Delete scrap log entries › 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 scrap log entries › Request Body

​string[]

Delete scrap log entries › Responses

Scrap log entries deleted successfully

deletedCount
​integer · int32

Number of items deleted

deletedIds
​string[]

List of IDs that were deleted


Download scrap log as CSV

GET
https://api.gosmarter.ai
/api/company/{companyId}/scrap-log/download

Downloads all scrap log entries for a company as a CSV file

Download scrap log as CSV › path Parameters

companyId
​string · uuid · required

The unique identifier of the company

Download scrap log as CSV › query Parameters

active
​boolean

Filter by active status (true = active items, false = deleted items). Defaults to true.

Download scrap log 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 scrap log as CSV › Responses

CSV file with scrap log data

string · binary

Get a scrap log entry by ID

GET
https://api.gosmarter.ai
/api/company/{companyId}/scrap-log/{scrapLogId}

Retrieves a single scrap log entry by its unique ID within the specified company.

Get a scrap log entry by ID › path Parameters

companyId
​string · uuid · required

The unique identifier of the company that owns the scrap log entry

scrapLogId
​string · uuid · required

The unique identifier of the scrap log entry to retrieve

Get a scrap log entry by ID › 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 a scrap log entry by ID › Responses

Scrap log entry retrieved successfully

loggedByName
​string

Display name of the user who logged this entry

scrapLogId
​string · uuid

Unique identifier for the scrap log entry

companyId
​string · uuid

Identifier of the owning company

logDate
​string · date-time

Date when the scrap was logged

binSkipReference
​string

Bin or skip reference identifier

startingWeight
​number · double

Starting weight in kilograms

closingWeight
​number · double

Closing weight in kilograms

netWeight
​number · double

Net weight (calculated as ClosingWeight - StartingWeight) in kilograms

loggedBy
​string · uuid

User ID of the person who logged this entry

createdAt
​string · date-time

Timestamp when the record was created (UTC)

updatedAt
​string · date-time

Timestamp when the record was last updated (UTC)

active
​boolean

Soft delete flag (true = active, false = deleted)


Get scrap log change history

GET
https://api.gosmarter.ai
/api/company/{companyId}/scrap-log/{scrapLogId}/history

Returns field-level audit history for a specific scrap log entry, derived from SQL Server temporal tables.

Get scrap log change history › path Parameters

companyId
​string · uuid · required

The unique identifier of the company

scrapLogId
​string · uuid · required

The unique identifier of the scrap log entry

Get scrap log 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 scrap log change history › Responses

List of audit events for the scrap log entry

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

Restore deleted scrap log entries

POST
https://api.gosmarter.ai
/api/company/{companyId}/scrap-log/restore

Restores one or more soft-deleted scrap log entries by setting Active = 1.

Restore deleted scrap log entries › path Parameters

companyId
​string · uuid · required

The unique identifier of the company owning the entries

Restore deleted scrap log entries › 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 scrap log entries › Request Body

​string[]

Restore deleted scrap log entries › Responses

Scrap log entries restored successfully

deletedCount
​integer · int32

Number of items deleted

deletedIds
​string[]

List of IDs that were deleted


Upload scrap log from CSV

POST
https://api.gosmarter.ai
/api/company/{companyId}/scrap-log/upload

Uploads and processes a CSV file to create scrap log entries in bulk

Upload scrap log from CSV › path Parameters

companyId
​string · uuid · required

The unique identifier of the company

Upload scrap log from 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.

Upload scrap log from CSV › Request Body

Upload scrap log from CSV › Responses

CSV uploaded and processed successfully


Get CSV upload template

GET
https://api.gosmarter.ai
/api/company/{companyId}/scrap-log/upload-template

Downloads a CSV template file with example scrap log data for bulk uploads

Get CSV upload template › path Parameters

companyId
​string · uuid · required

The unique identifier of the company

Get CSV upload template › 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 template › Responses

CSV template file with examples

string · binary