API Docs
Request the list of product lists
Get the list of product lists. Each product list is an object with id
and slug
fields.
Method: GET
URL
https://app.cu-ta.de/api/:prefix/v1/lists
Authorization
Bearer `token`
Parameter
Field | Type | Description |
---|---|---|
page optional | Number | Optional page number. If not provided, the first page will be returned. Each page contains 30 products. |
Sucess 200
Field | Type | Description |
---|---|---|
lists | Object[] | List of product lists. |
id | String | ID. |
slug | String | Slug. |
name | String | Name. |
inserted_at | String | Creation timestamp. |
updated_at | String | Timestamp of the last update. |
is_deleted | Boolean | Soft deleted. |
Error 4xx
Field | Type | Description |
---|---|---|
reason | String | Error reason. |
Product
Request the list of products
Get the list of products that were updated after the given timestamp. Each product is an object with the fields listed below.
Method: GET
URL
https://app.cu-ta.de/api/:prefix/v1/products
Authorization
Bearer `token`
Parameter
Field | Type | Description |
---|---|---|
timestamp | String | Timestamp that controls when the listed products must have been last updated. Must be a string in ISO8601 format, we use German time and ignore offset. Example (will have the same result) "2020-06-30T15:45:33" or "2020-06-30T15:45:33+0200". |
page optional | Number | Optional page number. If none given the first page will be delivered. |
list_id optional | Integer | Optional list ID. If none given, all the products independent of their list will be delivered. |
deleted optional | Boolean | Optional, default is false. If set to true or a truthy value, only the soft deleted products will be delivered. |
include_archived optional | Boolean | Optional, default is false. If set to true or 1, all products including those archived will be delivered. |
Sucess 200
Field | Type | Description |
---|---|---|
products | Object[] | List of products. |
id | Integer | ID. |
article_number | String | Article number. |
classification | Object or NULL | Classification, will have different structure depending on the type field: {"type" => "cmp_vzta", "bti" => String, "ctn" => String, "ctn_8" => String, "ctn_10" => String, "ctn_format" => String, "tradename2" => String, "comment" => String, "is_fixed" => Boolean, "is_av3" => Boolean, "status" => String, "tradename" => String, "reason" => String, "valid_from" => String, "valid_until" => String, "bti_found" => String or NULL} {"type" => "grt_vzta", "bti" => String, "ctn" => String, "ctn_8" => String, "ctn_10" => String, "ctn_format" => String, "tradename2" => String, "comment" => String, "is_fixed" => Boolean, "is_av3" => Boolean, "reason" => String, "valid_from" => String, "valid_until" => String, "status" => String, "tradename" => String, "bti_found" => String or NULL} {"type" => "manual", "ctn" => String, "ctn_8" => String, "ctn_10" => String, "ctn_format" => String, "tradename2" => String, "reason" => String, "features" => String, "comment" => String, "is_fixed" => Boolean, "is_av3" => Boolean, "status" => String, "tradename" => String} {"type" => "special", "ctn" => String, "ctn_8" => String, "ctn_10" => String, "ctn_format" => String, "tradename2" => String, "comment" => String, "is_fixed" => Boolean, "is_av3" => Boolean, "status" => String, "tradename" => String} |
data | Object[] | Product data. |
article_number | String | Article number. |
designation | String | Designation. |
designation2 | String | Designation2. |
feature1 | String | Feature1. |
feature2 | String | Feature2. |
feature3 | String | Feature3. |
feature4 | String | Feature4. |
feature5 | String | Feature5. |
feature6 | String | Feature6. |
is_prio | Boolean | Priority product. |
is_eccn | Boolean | US Export Controls. |
eccn_comment | String | ECCN. |
machine_type | String | Machine Type. |
assembly_group | String | Assembly Unit. |
status | String | Status |
vendor | String | Vendor / manufacturer. |
eccns | Object or NULL | ECCNs. |
codes | String | List of ECCN codes. |
comment | String | ECCN comment. |
is_unlisted | Boolean | Is unlisted goods. |
files | Object[] | A list of files. |
path | String | File path (ID). |
username | String | Name of the user who created the file. |
date | String | Timestamp of the file creation. |
inserted_at | String | Creation timestamp, naive German time without offset. |
updated_at | String | Timestamp of the last update, naive German time without offset. |
is_deleted | Boolean | Soft deleted. |
list_id | Integer | List ID. |
user_id | Integer | User ID. |
user_name | Integer | User Name. |
Error 4xx
Field | Type | Description |
---|---|---|
reason | String | Error reason. |
Create a product
Create a product with given attributes. The ID of the new product will be returned if successful.
Method: POST
URL
https://app.cu-ta.de/api/:prefix/v1/products
Authorization
Bearer `token`
Parameter
Field | Type | Description |
---|---|---|
list_id | Integer | ID of an existing product list. |
product | Object | Product parameters. |
article_number | String | Article number. |
designation | String | Designation. |
designation2 optional | String | Designation2. |
vendor optional | String | Vendor / manufacturer. |
feature1 optional | String | Feature1. |
feature2 optional | String | Feature2. |
feature3 optional | String | Feature3. |
feature4 optional | String | Feature4. |
feature5 optional | String | Feature5. |
feature6 optional | String | Feature6. |
is_prio optional | Boolean | Priority product. |
is_eccn optional | Boolean | US Export Controls. |
eccn_comment optional | String | ECCN. |
machine_type optional | String | Machine Type. |
assembly_group optional | String | Assembly Unit. |
is_nuclear optional | Boolean | Nuclear Article Marker. |
import_article optional | Boolean | Import Article Marker. |
is_military optional | Boolean | Military Article Marker. |
supplier_ctn optional | String | Supplier CTN |
presystem_ctn optional | String | System CTN |
type_of_sourcing optional | String | Accepts: F, E, H, X |
system_material optional | String | System Material. e.g. "Stainless STEEL" |
country_of_origin optional | Object | Country of Origin Details, ISO-Country-Code Format e.g. "DE", "NL" |
non_preferential optional | String | Non preferential |
preferential optional | String | Preferential |
made_in optional | String | Made in |
Sample
Sample Request
{
"list_id":1,
"product":{
"article_number":"02-0656542",
"designation":"Frequenzumformer",
"designation2":"Optional Designation 2 (Optional)",
"vendor":"Vendor/Manufacturer (Optional)",
"feature1":"Feature 1 (Optional)",
"feature2":"Feature 2 (Optional)",
"feature3":"Feature 3 (Optional)",
"feature4":"Feature 4 (Optional)",
"feature5":"Feature 5 (Optional)",
"feature6":"Feature 6 (Optional)",
"is_prio":false,
"is_eccn":false,
"eccn_comment":"",
"assembly_group":"",
"is_nuclear":false,
"import_article":false,
"is_military":false,
"supplier_ctn":"85044083",
"type_of_sourcing":"F",
"country_of_origin":{
"non_preferential":"CN",
"preferential":"AL",
"made_in":"DE"
}
}
}
Code 201
Field | Type | Description |
---|---|---|
id | Integer | ID of the newly created product. |
Error 4xx
Field | Type | Description |
---|---|---|
reason | String | Error reason. |
Find a product
Create a product with given attributes. The ID of the new product will be returned if successful.
Method: POST
URL
https://app.cu-ta.de/api/:prefix/v1/products/find
Authorization
Bearer `token`
Parameter
Field | Type | Description |
---|---|---|
article_number | String | The value of the article number to search for. |
deleted optional | Boolean | Optional, default is false. If set to true or a truthy value, only the soft deleted products will be delivered. |
Success 200
Field | Type | Description |
---|---|---|
product | Object | The resulting product. Object's structure is the same as the one used when listing products. |
Error 4xx
Field | Type | Description |
---|---|---|
reason | String | Error reason. |
Update a product
Update a product identified by the given article number with given attributes.
Method: PUT
URL
https://app.cu-ta.de/api/:prefix/v1/products
Authorization
Bearer `token`
Parameter
Field | Type | Description |
---|---|---|
article_number | String | Article number of an existing product, used to identify product that needs to be changed. This value wil override anything that is passed as article_number in parameters. |
product | Object | Product parameters. |
designation | String | Designation. |
designation2 optional | String | Designation2. |
vendor optional | String | Vendor / manufacturer. |
feature1 optional | String | Feature1. |
feature2 optional | String | Feature2. |
feature3 optional | String | Feature3. |
feature4 optional | String | Feature4. |
feature5 optional | String | Feature5. |
feature6 optional | String | Feature6. |
is_prio optional | Boolean | Priority product. |
is_eccn optional | Boolean | US Export Controls. true/false |
eccn_comment optional | String | ECCN. |
machine_type optional | String | Machine Type. |
assembly_group optional | String | Assembly Unit. |
is_nuclear optional | Boolean | Nuclear Article Marker. true/false |
import_article optional | Boolean | Import Article Marker. true/false |
is_military optional | Boolean | Military Article Marker. true/false |
supplier_ctn optional | String | Supplier CTN |
presystem_ctn optional | String | System CTN |
type_of_sourcing optional | String | Accepts: F, E, H, X |
system_material optional | String | System Material. e.g. "Stainless STEEL" |
country_of_origin optional | Object | Country of Origin Details, ISO-Country-Code Format e.g. "DE", "NL" |
non_preferential optional | String | Non preferential |
preferential optional | String | Preferential |
made_in optional | String | Made in |
reset_classification optional | Boolean | Reset Classification |
Success 200
Field | Type | Description |
---|---|---|
id | Integer | ID of the latest action related to the affected product, might come from this change or from autoupdater's adjustments. |
Error 4xx
Field | Type | Description |
---|---|---|
reason | String | Error reason. |