Update Product
This endpoint updates an existing product for a specific declaration.
Endpoint
PUT /api/v1/declarations/{declaration_id}/products/{product_id}
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| declaration_id | string | The unique identifier of the declaration |
| product_id | string | The unique identifier of the product |
Headers
| Header | Value | Description |
|---|---|---|
Authorization | Required. Bearer token for authentication | |
Content-Type | Required. Must be application/json | |
X-Target-Server | Required. Target server identifier |
Request Body
{
"gtip": {
"code": "string",
"item_information": "string"
},
"imex_type": "integer",
"regime_code": "integer",
"serial_number": "integer",
"made_in_country": {
"code": "string",
"name": "string"
},
"gross_weight_kg": "number",
"net_weight_kg": "number",
"measurement": {
"unit": "string",
"value": "number"
},
"taxes": [
{
"id": "string",
"code": "integer",
"base": "number",
"rate": "number",
"amount": "number"
}
],
"quantity": "integer",
"item_definition": {
"box_type": "string",
"box_count": "integer",
"box_brand": "string",
"trading_definition": "string"
},
"total_invoice": {
"currency": "string",
"amount": "number"
},
"documents": [
{
"id": "string",
"name": "string",
"url": "string",
"type": "string",
"hash": "string",
"size": "integer",
"created_at": "string"
}
]
}
Request Body Fields
| Field | Type | Description | Validation |
|---|---|---|---|
| gtip.code | string | GTIP code of the product | Required |
| gtip.item_information | string | Information about the item | Optional |
| imex_type | integer | Import/Export type | Required, must be valid IMEX type |
| regime_code | integer | Regime code | Required, must be valid regime code |
| serial_number | integer | Serial number of the product | Required |
| made_in_country.code | string | Country code | Required |
| made_in_country.name | string | Country name | Required |
| gross_weight_kg | number | Gross weight in kilograms | Required |
| net_weight_kg | number | Net weight in kilograms | Required |
| measurement.unit | string | Unit of measurement | Required, must be valid unit type |
| measurement.value | number | Value of measurement | Required |
| taxes | array | Array of tax information | Required |
| taxes[].id | string | Tax ID | Required, must be valid UUID4 |
| taxes[].code | integer | Tax code | Required, must be valid tax code |
| taxes[].base | number | Tax base amount | Required |
| taxes[].rate | number | Tax rate | Required |
| taxes[].amount | number | Tax amount | Required |
| quantity | integer | Quantity of the product | Required |
| item_definition.box_type | string | Box type code | Required, must be valid box type |
| item_definition.box_count | integer | Number of boxes | Required |
| item_definition.box_brand | string | Brand of the box | Required |
| item_definition.trading_definition | string | Trading definition | Required |
| total_invoice.currency | string | Currency code | Required, must be valid currency type |
| total_invoice.amount | number | Total invoice amount | Required |
| documents | array | Array of document information | Optional |
| documents[].id | string | Document ID | Required |
| documents[].name | string | Document name | Required |
| documents[].url | string | Document URL | Required |
| documents[].type | string | Document type | Required |
| documents[].hash | string | Document hash | Required |
| documents[].size | integer | Document size | Required |
| documents[].created_at | string | Document creation date | Required |
Valid Measurement Units
| Unit | Description |
|---|---|
| GT | Gross Ton |
| c/k | Count per Kilogram |
| ce/el | Count per Element |
| ct/l | Count per Liter |
| g | Gram |
| g F/S | Gram Free/Sale |
| kg H₂O₂ | Kilogram Hydrogen Peroxide |
| kg K₂O | Kilogram Potassium Oxide |
| kg KOH | Kilogram Potassium Hydroxide |
| kg met.am. | Kilogram Metallic Ammonia |
| kg N | Kilogram Nitrogen |
| kg NaOH | Kilogram Sodium Hydroxide |
| kg/net eda | Kilogram per Net EDA |
| kg P₂O₅ | Kilogram Phosphorus Pentoxide |
| kg %90 sdt | Kilogram 90% SDT |
| kg U | Kilogram Uranium |
| 1000 kWh | 1000 Kilowatt Hours |
| l | Liter |
| Kg C₅H₁₄ClNO | Kilogram C₅H₁₄ClNO |
| 1000 l | 1000 Liters |
| l alc. %100 | Liter Alcohol 100% |
| m | Meter |
| m² | Square Meter |
| m³ | Cubic Meter |
| 1000 m³ | 1000 Cubic Meters |
| p/a | Piece per Area |
| p/st | Piece per Set |
| 100 p/st | 100 Pieces per Set |
| 1000 p/st | 1000 Pieces per Set |
| TJ | Terajoule |
Valid IMEX Types
| Code | Type | Description |
|---|---|---|
| 1 | DefiniteExport | Definite Export |
| 2 | TemporaryExport | Temporary Export |
| 3 | SpecialExport | Special Export |
| 4 | SolidImport | Solid Import |
| 5 | TemporaryImport | Temporary Import |
| 6 | ReImport | Re-Import |
| 7 | AntrepoImport | Antrepo Import |
| 9 | OtherIMEX | Other Import/Export |
Valid Regime Codes
| Code | Description |
|---|---|
| 1000 | Normal Import |
| 1021 | Import with Special Permission |
| 1023 | Import with Special Permission |
| 1040 | Import with Special Permission |
| 1042 | Import with Special Permission |
| 1072 | Import with Special Permission |
| 1091 | Import with Special Permission |
| 2100 | Normal Export |
| 2123 | Export with Special Permission |
| 2141 | Export with Special Permission |
| 2151 | Export with Special Permission |
| 2152 | Export with Special Permission |
| 2153 | Export with Special Permission |
| 2172 | Export with Special Permission |
| 2191 | Export with Special Permission |
| 2300 | Normal Export |
| 2340 | Export with Special Permission |
| 2341 | Export with Special Permission |
| 2342 | Export with Special Permission |
| 2351 | Export with Special Permission |
| 2352 | Export with Special Permission |
| 2353 | Export with Special Permission |
| 2600 | Normal Export |
| 3141 | Export with Special Permission |
| 3151 | Export with Special Permission |
| 3152 | Export with Special Permission |
| 3153 | Export with Special Permission |
| 3158 | Export with Special Permission |
| 3171 | Export with Special Permission |
| 4000 | Normal Import |
| 4010 | Import with Special Permission |
| 4051 | Import with Special Permission |
| 4053 | Import with Special Permission |
| 4058 | Import with Special Permission |
| 4071 | Import with Special Permission |
| 4072 | Import with Special Permission |
| 4091 | Import with Special Permission |
| 4100 | Normal Import |
| 4121 | Import with Special Permission |
| 4123 | Import with Special Permission |
| 4171 | Import with Special Permission |
| 4191 | Import with Special Permission |
| 4200 | Normal Import |
| 4210 | Import with Special Permission |
| 4251 | Import with Special Permission |
| 4253 | Import with Special Permission |
| 4258 | Import with Special Permission |
| 4271 | Import with Special Permission |
| 4291 | Import with Special Permission |
| 5100 | Normal Import |
| 5121 | Import with Special Permission |
| 5123 | Import with Special Permission |
| 5141 | Import with Special Permission |
| 5171 | Import with Special Permission |
| 5191 | Import with Special Permission |
| 5200 | Normal Import |
| 5221 | Import with Special Permission |
| 5223 | Import with Special Permission |
| 5271 | Import with Special Permission |
| 5291 | Import with Special Permission |
| 5300 | Normal Import |
| 5321 | Import with Special Permission |
| 5323 | Import with Special Permission |
| 5341 | Export with Special Permission |
| 5351 | Export with Special Permission |
| 5352 | Export with Special Permission |
| 5353 | Export with Special Permission |
| 5358 | Export with Special Permission |
| 5371 | Export with Special Permission |
| 5391 | Export with Special Permission |
| 5800 | Normal Import |
| 6121 | Import with Special Permission |
| 6123 | Import with Special Permission |
| 6321 | Import with Special Permission |
| 6323 | Import with Special Permission |
| 6326 | Import with Special Permission |
| 6521 | Import with Special Permission |
| 6523 | Import with Special Permission |
| 6771 | Import with Special Permission |
| 7100 | Normal Import |
| 7121 | Import with Special Permission |
| 7123 | Import with Special Permission |
| 7141 | Import with Special Permission |
| 7151 | Export with Special Permission |
| 7153 | Export with Special Permission |
| 7158 | Export with Special Permission |
| 7171 | Export with Special Permission |
| 7191 | Export with Special Permission |
| 7200 | Normal Import |
| 7241 | Import with Special Permission |
| 7252 | Import with Special Permission |
| 7272 | Import with Special Permission |
| 9100 | Normal Import |
| 9171 | Import with Special Permission |
Valid Box Types
| Code | Description |
|---|---|
| 43 | Container |
| AA | Standard Box |
| AB | Special Box |
| AC | Custom Box |
| AD | Special Container |
| AE | Export Box |
| AF | Import Box |
| AG | Special Export Box |
| AH | Special Import Box |
| AI | Custom Export Box |
| AJ | Custom Import Box |
| AM | Mixed Box |
| AP | Special Package |
| AT | Transport Box |
| AV | Aviation Box |
| BA | Bulk Box |
| BB | Bulk Container |
| BC | Bulk Special |
| BD | Bulk Custom |
| BE | Bulk Export |
| BF | Bulk Import |
| BG | Bulk Special Export |
| BH | Bulk Special Import |
| BI | Bulk Custom Export |
| BJ | Bulk Custom Import |
| BK | Bulk Mixed |
| BL | Bulk Package |
| BM | Bulk Transport |
| BN | Bulk Aviation |
| BO | Bulk Storage |
| BP | Bulk Handling |
| BQ | Bulk Processing |
| BR | Bulk Distribution |
| BS | Bulk Shipping |
| BT | Bulk Trading |
| BU | Bulk Manufacturing |
| BV | Bulk Production |
| BW | Bulk Assembly |
| BX | Bulk Packaging |
| BY | Bulk Labeling |
| BZ | Bulk Marking |
| CA | Container A |
| CB | Container B |
| CC | Container C |
| CD | Container D |
| CE | Container E |
| CF | Container F |
| CG | Container G |
| CH | Container H |
| CI | Container I |
| CJ | Container J |
| CK | Container K |
| CL | Container L |
| CM | Container M |
| CN | Container N |
| CO | Container O |
| CP | Container P |
| CQ | Container Q |
| CR | Container R |
| CS | Container S |
| CT | Container T |
| CU | Container U |
| CV | Container V |
| CW | Container W |
| CX | Container X |
| CY | Container Y |
| CZ | Container Z |
| DA | Document A |
| DB | Document B |
| DC | Document C |
| DG | Document G |
| DH | Document H |
| DI | Document I |
| DJ | Document J |
| DK | Document K |
| DL | Document L |
| DM | Document M |
| DN | Document N |
| DP | Document P |
| DR | Document R |
| DS | Document S |
| DT | Document T |
| DU | Document U |
| DV | Document V |
| DW | Document W |
| DX | Document X |
| DY | Document Y |
| EC | Electronic C |
| ED | Electronic D |
| EE | Electronic E |
| EF | Electronic F |
| EG | Electronic G |
| EH | Electronic H |
| EI | Electronic I |
| EN | Electronic N |
| FC | Food Container |
| FD | Food Document |
| FI | Food Item |
| FL | Food Label |
| FO | Food Order |
| FP | Food Package |
| FR | Food Record |
| FT | Food Transport |
| FX | Food Export |
| GB | General Box |
| GI | General Item |
| GR | General Record |
| GZ | General Zone |
| HA | Hazardous A |
| HB | Hazardous B |
| HC | Hazardous C |
| HG | Hazardous G |
| HR | Hazardous Record |
| IA | Item A |
| IB | Item B |
| IC | Item C |
| ID | Item D |
| IE | Item E |
| IF | Item F |
| IG | Item G |
| IH | Item H |
| IK | Item K |
| IN | Item N |
| IZ | Item Z |
| JC | Jewelry Container |
| JG | Jewelry Guard |
| JR | Jewelry Record |
| JT | Jewelry Transport |
| JY | Jewelry Year |
| KG | Kilogram |
| KN | Container |
| LG | Large |
| LT | Light |
| LV | Level |
| LZ | Lazy |
| MB | Medium Box |
| MC | Medium Container |
| MR | Medium Record |
| MS | Medium Size |
| MT | Medium Transport |
| MW | Medium Weight |
| MX | Medium Export |
| NA | Not Available |
| NE | Not Export |
| NF | Not Found |
| NG | Not Good |
| NS | Not Suitable |
| NT | Not Transport |
| NU | Not Used |
| NV | Not Valid |
| OG | Original |
| OH | Original High |
| OI | Original Import |
| OJ | Original Jewelry |
| OL | Original Label |
| OM | Original Mark |
| ON | Original Number |
| OP | Original Package |
| OQ | Original Quality |
| OR | Original Record |
| OS | Original Size |
| OV | Original Value |
| OW | Original Weight |
| OX | Original Export |
| OY | Original Year |
| OZ | Original Zone |
| O1 | Original 1 |
| O2 | Original 2 |
| O3 | Original 3 |
| O4 | Original 4 |
| O5 | Original 5 |
| O6 | Original 6 |
| O7 | Original 7 |
| O8 | Original 8 |
| O9 | Original 9 |
| PA | Package A |
| PB | Package B |
| PC | Package C |
| PD | Package D |
| PE | Package E |
| PF | Package F |
| PG | Package G |
| PH | Package H |
| PI | Package I |
| PJ | Package J |
| PK | Package K |
| PL | Package L |
| PN | Package N |
| PO | Package O |
| PP | Package P |
| PR | Package R |
| PT | Package T |
| PU | Package U |
| PV | Package V |
| PX | Package X |
| PY | Package Y |
| PZ | Package Z |
| P1 | Package 1 |
| P3 | Package 3 |
| P4 | Package 4 |
| QA | Quality A |
| QB | Quality B |
| QC | Quality C |
| QD | Quality D |
| QF | Quality F |
| QG | Quality G |
| QH | Quality H |
| QJ | Quality J |
| QK | Quality K |
| QL | Quality L |
| QM | Quality M |
| QN | Quality N |
| QP | Quality P |
| Quality Q | |
| QR | Quality R |
| QS | Quality S |
| RD | Record D |
| RG | Record G |
| RJ | Record J |
| RK | Record K |
| RL | Record L |
| RO | Record O |
| RT | Record T |
| RZ | Record Z |
| SA | Special A |
| SB | Special B |
| SC | Special C |
| SD | Special D |
| SE | Special E |
| SH | Special H |
| SI | Special I |
| SK | Special K |
| SL | Special L |
| SM | Special M |
| SO | Special O |
| SP | Special P |
| SS | Special S |
| ST | Special T |
| SU | Special U |
| SV | Special V |
| SW | Special W |
| SX | Special X |
| SY | Special Y |
| SZ | Special Z |
| TB | Transport B |
| TC | Transport C |
| TD | Transport D |
| TI | Transport I |
| TK | Transport K |
| TL | Transport L |
| TN | Transport N |
| TO | Transport O |
| TR | Transport R |
| TS | Transport S |
| TU | Transport U |
| TV | Transport V |
| TY | Transport Y |
| TZ | Transport Z |
| UC | Unit C |
| VA | Value A |
| VG | Value G |
| VI | Value I |
| VK | Value K |
| VL | Value L |
| VO | Value O |
| VP | Value P |
| VQ | Value Q |
| VR | Value R |
| VY | Value Y |
| WA | Weight A |
| WB | Weight B |
| WC | Weight C |
| WD | Weight D |
| WF | Weight F |
| WG | Weight G |
| WH | Weight H |
| WJ | Weight J |
| WK | Weight K |
| WL | Weight L |
| WM | Weight M |
| WN | Weight N |
| WP | Weight P |
| WQ | Weight Q |
| WR | Weight R |
| WS | Weight S |
| WT | Weight T |
| WU | Weight U |
| WV | Weight V |
| WW | Weight W |
| WX | Weight X |
| WY | Weight Y |
| WZ | Weight Z |
| XA | Export A |
| XB | Export B |
| XC | Export C |
| XD | Export D |
| XF | Export F |
| XG | Export G |
| XH | Export H |
| XJ | Export J |
| XK | Export K |
| YA | Year A |
| YB | Year B |
| YC | Year C |
| YD | Year D |
| YF | Year F |
| YG | Year G |
| YH | Year H |
| YJ | Year J |
| YK | Year K |
| YL | Year L |
| YM | Year M |
| YN | Year N |
| YP | Year P |
| YQ | Year Q |
| YR | Year R |
| YS | Year S |
| YT | Year T |
| YV | Year V |
| YW | Year W |
| YX | Year X |
| YY | Year Y |
| YZ | Year Z |
| ZA | Zone A |
| ZB | Zone B |
| ZC | Zone C |
| ZD | Zone D |
| ZF | Zone F |
| ZG | Zone G |
| ZH | Zone H |
| ZJ | Zone J |
| ZK | Zone K |
| ZL | Zone L |
| ZM | Zone M |
| ZN | Zone N |
| ZP | Zone P |
| ZQ | Zone Q |
| ZR | Zone R |
| ZS | Zone S |
| ZT | Zone T |
| ZU | Zone U |
| ZV | Zone V |
| ZW | Zone W |
| ZX | Zone X |
| ZY | Zone Y |
| ZZ | Zone Z |
| 1A | Type 1A |
| 1B | Type 1B |
| 1D | Type 1D |
| 1G | Type 1G |
| 1W | Type 1W |
| 2C | Type 2C |
| 3A | Type 3A |
| 3H | Type 3H |
| 4A | Type 4A |
| 4B | Type 4B |
| 4C | Type 4C |
| 4D | Type 4D |
| 4F | Type 4F |
| 4G | Type 4G |
| 4H | Type 4H |
| 5H | Type 5H |
| 5L | Type 5L |
| 5M | Type 5M |
| 6H | Type 6H |
| 6P | Type 6P |
Valid Tax Codes
| Code | Description |
|---|---|
| 5 | %5 Tax Rate |
| 10 | %10 Tax Rate |
| 12 | %12 Tax Rate |
| 16 | %16 Tax Rate |
| 19 | %19 Tax Rate |
| 20 | %20 Tax Rate |
| 21 | %21 Tax Rate |
| 22 | %22 Tax Rate |
| 23 | %23 Tax Rate |
| 24 | %24 Tax Rate |
| 29 | %29 Tax Rate |
| 32 | %32 Tax Rate |
| 33 | %33 Tax Rate |
| 34 | %34 Tax Rate |
| 36 | %36 Tax Rate |
| 37 | %37 Tax Rate |
| 38 | %38 Tax Rate |
| 39 | %39 Tax Rate |
| 40 | %40 Tax Rate |
| 46 | %46 Tax Rate |
| 49 | %49 Tax Rate |
| 50 | %50 Tax Rate |
| 51 | %51 Tax Rate |
| 52 | %52 Tax Rate |
| 56 | %56 Tax Rate |
| 58 | %58 Tax Rate |
| 59 | %59 Tax Rate |
| 60 | %60 Tax Rate |
| 61 | %61 Tax Rate |
| 69 | %69 Tax Rate |
| 70 | %70 Tax Rate |
| 72 | %72 Tax Rate |
| 75 | %75 Tax Rate |
| 78 | %78 Tax Rate |
| 79 | %79 Tax Rate |
| 89 | %89 Tax Rate |
| 91 | %91 Tax Rate |
| 93 | %93 Tax Rate |
| 950 | Special Tax Rate 950 |
| 951 | Special Tax Rate 951 |
| 952 | Special Tax Rate 952 |
| 953 | Special Tax Rate 953 |
| 954 | Special Tax Rate 954 |
| 955 | Special Tax Rate 955 |
| 956 | Special Tax Rate 956 |
| 957 | Special Tax Rate 957 |
| 958 | Special Tax Rate 958 |
| 959 | Special Tax Rate 959 |
| 960 | Special Tax Rate 960 |
| 961 | Special Tax Rate 961 |
| 962 | Special Tax Rate 962 |
| 963 | Special Tax Rate 963 |
| 964 | Special Tax Rate 964 |
| 965 | Special Tax Rate 965 |
| 966 | Special Tax Rate 966 |
| 967 | Special Tax Rate 967 |
| 991 | Special Tax Rate 991 |
| 992 | Special Tax Rate 992 |
| 993 | Special Tax Rate 993 |
| 994 | Special Tax Rate 994 |
| 995 | Special Tax Rate 995 |
Response
Success Response (200 OK)
{
"id": "string",
"declaration_id": "string",
"gtip": {
"code": "string",
"item_information": "string"
},
"imex_type": "integer",
"regime_code": "integer",
"serial_number": "integer",
"made_in_country": {
"code": "string",
"name": "string"
},
"gross_weight_kg": "number",
"net_weight_kg": "number",
"measurement": {
"unit": "string",
"value": "number"
},
"taxes": [
{
"id": "string",
"code": "integer",
"base": "number",
"rate": "number",
"amount": "number"
}
],
"quantity": "integer",
"item_definition": {
"box_type": "string",
"box_count": "integer",
"box_brand": "string",
"trading_definition": "string"
},
"total_invoice": {
"currency": "string",
"amount": "number"
},
"documents": [
{
"id": "string",
"name": "string",
"url": "string",
"type": "string",
"hash": "string",
"size": "integer",
"created_at": "string"
}
],
"is_auto_generated": "boolean",
"auto_fill_id": "string",
"created_at": "string",
"updated_at": "string",
"deleted_at": "string"
}
Example Request
curl --request PUT \
--url 'http://localhost:3449/api/v1/declarations/67db101b6f7e65dcdd379d6f/products/67db13bb35fcbe5344d72cd6' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \
--header 'Content-Type: application/json' \
--header 'X-Target-Server: declaration' \
--data '{
"gtip": {
"code": "8471.30.00.00.00",
"item_information": "Laptop computers"
},
"imex_type": 3,
"regime_code": 1000,
"serial_number": 1,
"made_in_country": {
"code": "TR",
"name": "Türkiye"
},
"gross_weight_kg": 2.5,
"net_weight_kg": 2.0,
"measurement": {
"unit": "GT",
"value": 1
},
"item_definition": {
"box_type": "AA",
"box_count": 1,
"box_brand": "Apple",
"trading_definition": "MacBook Pro 16-inch"
},
"total_invoice": {
"currency": "USD",
"amount": 1999.99
},
"documents": [],
"taxes": [
{
"id": "123e4567-e89b-12d3-a456-426614174002",
"code": 5,
"base": 1999.99,
"rate": 18.0,
"amount": 359.99
}
],
"quantity": 1
}'
Example Response
{
"id": "67db13bb35fcbe5344d72cd6",
"declaration_id": "67db101b6f7e65dcdd379d6f",
"gtip": {
"code": "8471.30.00.00.00",
"item_information": "Laptop computers"
},
"imex_type": 3,
"regime_code": 1000,
"serial_number": 1,
"made_in_country": {
"code": "TR",
"name": "Türkiye"
},
"gross_weight_kg": 2.5,
"net_weight_kg": 2.0,
"measurement": {
"unit": "GT",
"value": 1
},
"taxes": [
{
"id": "123e4567-e89b-12d3-a456-426614174002",
"code": 5,
"base": 1999.99,
"rate": 18.0,
"amount": 359.99
}
],
"quantity": 1,
"item_definition": {
"box_type": "AA",
"box_count": 1,
"box_brand": "Apple",
"trading_definition": "MacBook Pro 16-inch"
},
"total_invoice": {
"currency": "USD",
"amount": 1999.99
},
"documents": [],
"is_auto_generated": false,
"auto_fill_id": null,
"created_at": "2025-01-13T11:53:09.392Z",
"updated_at": "2025-01-13T11:53:09.392Z",
"deleted_at": null
}