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`
Accept
application/json
Parameter
FieldTypeDescription
page optionalNumberOptional page number. If not provided, the first page will be returned. Each page contains 30 products.
Sucess 200
FieldTypeDescription
listsObject[]List of product lists.
    idStringID.
    slugStringSlug.
    nameStringName.
    inserted_atStringCreation timestamp.
    updated_atStringTimestamp of the last update.
    is_deletedBooleanSoft deleted.
Error 4xx
FieldTypeDescription
reasonStringError 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`
Accept
application/json
Parameter
FieldTypeDescription
timestampStringTimestamp 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 optionalNumberOptional page number. If none given the first page will be delivered.
list_id optionalIntegerOptional list ID. If none given, all the products independent of their list will be delivered.
deleted optionalBooleanOptional, default is false. If set to true or a truthy value, only the soft deleted products will be delivered.
include_archived optionalBooleanOptional, default is false. If set to true or 1, all products including those archived will be delivered.
Sucess 200
FieldTypeDescription
productsObject[]List of products.
idIntegerID.
article_numberStringArticle number.
classificationObject or NULLClassification, 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}
dataObject[]Product data.
    article_numberStringArticle number.
    designationStringDesignation.
    designation2StringDesignation2.
    feature1StringFeature1.
    feature2StringFeature2.
    feature3StringFeature3.
    feature4StringFeature4.
    feature5StringFeature5.
    feature6StringFeature6.
    is_prioBooleanPriority product.
    is_eccnBooleanUS Export Controls.
    eccn_commentStringECCN.
    machine_typeStringMachine Type.
    assembly_groupStringAssembly Unit.
    statusStringStatus
    vendorStringVendor / manufacturer.
eccnsObject or NULLECCNs.
    codesStringList of ECCN codes.
    commentStringECCN comment.
    is_unlistedBooleanIs unlisted goods.
filesObject[]A list of files.
    pathStringFile path (ID).
    usernameStringName of the user who created the file.
    dateStringTimestamp of the file creation.
inserted_atStringCreation timestamp, naive German time without offset.
updated_atStringTimestamp of the last update, naive German time without offset.
is_deletedBooleanSoft deleted.
list_idIntegerList ID.
user_idIntegerUser ID.
user_nameIntegerUser Name.
Error 4xx
FieldTypeDescription
reasonStringError 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`
Accept
application/json
Parameter
FieldTypeDescription
list_idIntegerID of an existing product list.
productObjectProduct parameters.
    article_numberStringArticle number.
    designationStringDesignation.
    designation2 optionalStringDesignation2.
    vendor optionalStringVendor / manufacturer.
    feature1 optionalStringFeature1.
    feature2 optionalStringFeature2.
    feature3 optionalStringFeature3.
    feature4 optionalStringFeature4.
    feature5 optionalStringFeature5.
    feature6 optionalStringFeature6.
    is_prio optionalBooleanPriority product.
    is_eccn optionalBooleanUS Export Controls.
    eccn_comment optionalStringECCN.
    machine_type optionalStringMachine Type.
    assembly_group optionalStringAssembly Unit.
    is_nuclear optionalBooleanNuclear Article Marker.
    import_article optionalBooleanImport Article Marker.
    is_military optionalBooleanMilitary Article Marker.
    supplier_ctn optionalStringSupplier CTN
    presystem_ctn optionalStringSystem CTN
    type_of_sourcing optionalStringAccepts: F, E, H, X
    system_material optionalStringSystem Material. e.g. "Stainless STEEL"
    country_of_origin optionalObjectCountry of Origin Details, ISO-Country-Code Format e.g. "DE", "NL"
       non_preferential optionalStringNon preferential
       preferential optionalStringPreferential
       made_in optionalStringMade 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
FieldTypeDescription
idIntegerID of the newly created product.
Error 4xx
FieldTypeDescription
reasonStringError 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`
Accept
application/json
Parameter
FieldTypeDescription
article_numberStringThe value of the article number to search for.
deleted optionalBooleanOptional, default is false. If set to true or a truthy value, only the soft deleted products will be delivered.
Success 200
FieldTypeDescription
productObjectThe resulting product. Object's structure is the same as the one used when listing products.
Error 4xx
FieldTypeDescription
reasonStringError 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`
Accept
application/json
Parameter
FieldTypeDescription
article_numberStringArticle 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.
productObjectProduct parameters.
    designationStringDesignation.
    designation2 optionalStringDesignation2.
    vendor optionalStringVendor / manufacturer.
    feature1 optionalStringFeature1.
    feature2 optionalStringFeature2.
    feature3 optionalStringFeature3.
    feature4 optionalStringFeature4.
    feature5 optionalStringFeature5.
    feature6 optionalStringFeature6.
    is_prio optionalBooleanPriority product.
    is_eccn optionalBooleanUS Export Controls. true/false
    eccn_comment optionalStringECCN.
    machine_type optionalStringMachine Type.
    assembly_group optionalStringAssembly Unit.
    is_nuclear optionalBooleanNuclear Article Marker. true/false
    import_article optionalBooleanImport Article Marker. true/false
    is_military optionalBooleanMilitary Article Marker. true/false
    supplier_ctn optionalStringSupplier CTN
    presystem_ctn optionalStringSystem CTN
    type_of_sourcing optionalStringAccepts: F, E, H, X
    system_material optionalStringSystem Material. e.g. "Stainless STEEL"
    country_of_origin optionalObjectCountry of Origin Details, ISO-Country-Code Format e.g. "DE", "NL"
       non_preferential optionalStringNon preferential
       preferential optionalStringPreferential
       made_in optionalStringMade in
    reset_classification optionalBooleanReset Classification
Success 200
FieldTypeDescription
idIntegerID of the latest action related to the affected product, might come from this change or from autoupdater's adjustments.
Error 4xx
FieldTypeDescription
reasonStringError reason.