application/json

Body Required

  • client_ref string Required

    客户参考号 (8-32 位,仅包含字母、数字、连字符和下划线)

    Minimum length is 8, maximum length is 32. Format should match the following pattern: ^[A-Z0-9\-_]+$.

  • lrn string

    申报参考号 (8-32 位,仅包含字母、数字、连字符和下划线)

    注意: 目前系统都支持自定义,但不保证未来所有系统都支持

    Minimum length is 8, maximum length is 32. Format should match the following pattern: ^[A-Z0-9\-_]+$.

  • template_code string Required

    申报模板代码 (8-32 位,仅包含字母、数字、连字符和下划线)

    Minimum length is 8, maximum length is 32. Format should match the following pattern: ^[A-Z0-9\-_]+$.

  • declaration_type string Required

    申报类型 (IM=进口,EX=出口)

    Values are IM or EX.

  • additional_declaration_type string Required

    附加申报类型 (A=标准申报,D=预申报)

    Values are A or D.

  • presentation_mode string

    呈报(确认)模式 (conditional, scheduled)

  • provisional_validation_datetime string(date-time)

    暂定确认时间(预申报场景)

  • declaration_office_code string Required
  • presentation_office_code string

    呈报办公室代码

  • shipment_carrier_ref string

    承运人参考号

  • mode_at_border string

    边境运输方式

    Values are sea, rail, road, air, or post.

  • inland_mode string

    内陆运输方式

  • country_of_dispatch_code string Required

    出口国代码 (ISO3166 alpha2 代码)

    Minimum length is 2, maximum length is 2. Format should match the following pattern: ^[A-Z]{2}$.

  • country_of_destination_code string Required

    进口国代码 (ISO3166 alpha2 代码)

    Minimum length is 2, maximum length is 2. Format should match the following pattern: ^[A-Z]{2}$.

  • gross_weight_in_kg number(float) Required

    总毛重(千克,必须大于 0)

    Minimum value is 0.001.

  • total_packages integer Required

    总包装数(必须大于 0)

    Minimum value is 1. Default value is 1.

  • unique_consignment_reference string

    唯一托运参考号

  • transaction_nature_code string

    交易性质代码 (WCO TDED 4423)

    • direct_sale (11): 直接销售/采购
    • consumer_sale (12): 与消费者直接交易(电商) [默认]
    • return_goods (21): 退货
    • other_transaction (99): 其他

    Values are direct_sale, consumer_sale, return_goods, replacement_returned, replacement_not_returned, transfer_to_warehouse, consignment, financial_leasing, ownership_transfer_free, processing_expected_return, processing_not_expected_return, after_processing_return, after_processing_not_return, temporary_movement, construction_materials, rental_over_24_months, or other_transaction. Default value is consumer_sale.

  • freight_payment_method_code string

    运费支付方式代码 (WCO TDED 4215)

    • cash (A): 现金支付
    • credit_card (B): 信用卡
    • cheque (C): 支票
    • other (D): 其他
    • electronic (H): 电子支付
    • account (Y): 承运人账户
    • not_prepaid (Z): 未预付

    Values are cash, credit_card, cheque, other, electronic, account, or not_prepaid.

  • location_of_goods_code string

    货物位置代码 (3 位 IATA 机场代码或 UN/LOCODE 格式) https://datahub.io/core/un-locode

    Format should match the following pattern: ^([A-Z]{3}|[A-Z]{2}[A-Z0-9]{3,})$.

  • location_of_goods_type string

    货物位置类型

  • location_of_goods object

    货物位置详情

    Hide location_of_goods attributes Show location_of_goods attributes object
    • country_code string
    • postal_code string
    • street_number string
    • city string
    • street_name string
  • delivery_terms string

    Values are EXW, FCA, CPT, CIP, DAP, DPU, DDP, DDU, FAS, FOB, CFR, or CIF.

  • delivery_terms_location string

    交货条款地点

  • currency_code string Required

    货币代码 (ISO4217 三字母代码) https://www.iban.com/currency-codes

    Format should match the following pattern: ^[A-Z]{3}$. Default value is EUR.

  • currency_exchange_rate number(float)

    汇率

  • ioss_number string

    IOSS 号码 (10-16 位,仅包含字母、数字和连字符)

    Minimum length is 10, maximum length is 16. Format should match the following pattern: ^[A-Z0-9\-]+$.

  • deferred_payment_account string

    延期付款账户

  • importer object
    Hide importer attributes Show importer attributes object
    • name string Required
    • attention_to string
    • street_address string Required
    • city string Required
    • state string
    • postal_code string Required
    • country_code string Required

      ISO3166 alpha2 code

    • email string
    • phone string
    • eori_number string
    • vat_number string
    • tax_id string
  • exporter object
    Hide exporter attributes Show exporter attributes object
    • name string Required
    • attention_to string
    • street_address string Required
    • city string Required
    • state string
    • postal_code string Required
    • country_code string Required

      ISO3166 alpha2 code

    • email string
    • phone string
    • eori_number string
    • vat_number string
    • tax_id string
  • buyer object
    Hide buyer attributes Show buyer attributes object
    • name string Required
    • attention_to string
    • street_address string Required
    • city string Required
    • state string
    • postal_code string Required
    • country_code string Required

      ISO3166 alpha2 code

    • email string
    • phone string
    • eori_number string
    • vat_number string
    • tax_id string
  • seller object
    Hide seller attributes Show seller attributes object
    • name string Required
    • attention_to string
    • street_address string Required
    • city string Required
    • state string
    • postal_code string Required
    • country_code string Required

      ISO3166 alpha2 code

    • email string
    • phone string
    • eori_number string
    • vat_number string
    • tax_id string
  • declarant object
    Hide declarant attributes Show declarant attributes object
    • name string Required
    • attention_to string
    • street_address string Required
    • city string Required
    • state string
    • postal_code string Required
    • country_code string Required

      ISO3166 alpha2 code

    • email string
    • phone string
    • eori_number string
    • vat_number string
    • tax_id string
  • representative object
    Hide representative attributes Show representative attributes object
    • name string Required
    • attention_to string
    • street_address string Required
    • city string Required
    • state string
    • postal_code string Required
    • country_code string Required

      ISO3166 alpha2 code

    • email string
    • phone string
    • eori_number string
    • vat_number string
    • tax_id string
  • documents array[object]

    相关文档

    Hide documents attributes Show documents attributes object
    • category string

      文档类别

      Values are transport, commercial, or other.

    • type_code string Required

      文档类型代码 N380=Invoice, N740=Air Waybill

    • reference_number string Required

      参考号码

    • valid_from string(date-time) Required

      有效期开始时间

    • file_url string(uri)

      文件 URL

  • items array[object]

    商品明细 (1-999 个商品)

    At least 1 but not more than 999 elements.

    Hide items attributes Show items attributes object
    • description string Required

      商品描述

    • commodity_code string Required

      商品编码

      Minimum length is 6, maximum length is 12.

    • national_additional_codes array[string]

      国家附加代码 (CANA - Code Additionnel National) 用于 CommodityCode/NationalAdditionalCode,标识税制相关的国家级商品分类扩展代码。 法国示例: T146, T153, V002, Q210 荷兰: 不适用 (荷兰无此字段)

    • additional_reference_codes array[string]

      附加参考代码 (Y-codes / Document Type Codes) 用于 AdditionalReference,标识监管合规相关的文档类型代码。 格式: "代码" 或 "代码:参考编号",如 "Y160:EXEMPT" 表示 type=Y160, referenceNumber=EXEMPT。 仅含代码时不填 referenceNumber。 荷兰示例: Y160, Y032, Y069 法国示例: Y160:EXEMPT, Y032

    • current_procedure_code string

      当前海关程序代码 (WCO TDED 9033)

      • free_circulation (40): 自由流通放行并国内消费
      • free_circulation_vat_exempt (42): 自由流通(VAT豁免,转运其他成员国)
      • free_circulation_end_use (44): 自由流通(特定最终用途)
      • ioss_import (48): IOSS方案进口
      • inward_processing (51): 内向加工
      • temporary_admission (53): 临时进口
      • customs_warehouse (71): 关税仓库
      • free_zone (78): 自由区

      Values are free_circulation, free_circulation_vat_exempt, free_circulation_end_use, ioss_import, inward_processing, temporary_admission, customs_warehouse, or free_zone.

    • additional_procedure_codes array[string]

      附加程序代码

    • previous_procedure_code string

      前一海关程序代码 (WCO TDED 9033)

      • none (00): 无(直接从第三国进口) [默认]
      • free_zone (07): 自由区
      • temporary_admission (21): 临时进口
      • free_circulation (40): 自由流通
      • inward_processing (51): 内向加工
      • customs_warehouse (71): 关税仓库

      Values are none, free_zone, temporary_admission, free_circulation, inward_processing, or customs_warehouse. Default value is none.

    • payment_method_code string

      税费支付方式代码 (WCO TDED 4467)

      • cash (A): 现金支付
      • credit (B): 信用证
      • deferred (C): 账户扣款/延期 [默认]
      • electronic (D): 电子支付
      • guarantee (E): 担保

      Values are cash, credit, deferred, electronic, or guarantee. Default value is deferred.

    • valuation_method_code string

      估价方法代码 (WCO TDED 5509)

      • transaction_value (1): 成交价格法 [默认]
      • identical_goods (2): 相同货物成交价格
      • similar_goods (3): 类似货物成交价格
      • deductive_method (4): 倒扣价格法
      • computed_method (5): 计算价格法
      • fallback_method (6): 合理方法

      Values are transaction_value, identical_goods, similar_goods, deductive_method, computed_method, or fallback_method. Default value is transaction_value.

    • currency_code string Required

      货币代码 (ISO4217 三字母代码)

      Format should match the following pattern: ^[A-Z]{3}$. Default value is EUR.

    • intrinsic_value decimal Required

      内在价值总价(该商品的总价值,非单价)

    • freight_cost integer

      运费总价(该商品的总运费,非单价)

    • insurance_cost integer

      保险费总价(该商品的总保险费,非单价)

    • gross_weight_in_grams integer Required

      毛重总重(克,该商品的总毛重,非单件重量)

    • net_weight_in_grams integer Required

      净重总重(克,该商品的总净重,非单件重量)

    • gross_weight_in_kg number(float)

      毛重总重(千克,该商品的总毛重,非单件重量)

    • net_weight_in_kg number(float)

      净重总重(千克,该商品的总净重,非单件重量)

    • package_type string

      包装类型代码 (WCO TDED 7065, UN/ECE Rec 21)

      • package (PK): 包装(通用) [默认]
      • carton (CT): 纸箱
      • box (BX): 箱子
      • bag (BG): 袋子
      • envelope (EN): 信封
      • parcel (PC): 小包裹
      • unpacked (NE): 未包装

      Values are package, carton, box, bag, crate, pallet, envelope, parcel, roll, tube, drum, unpacked, unpacked_single, or unpacked_multiple. Default value is package.

    • number_of_packages integer

      包装数量

      Default value is 1.

    • shipping_marks string

      运输标记

    • quantity integer Required

      数量

    • supplementary_units string

      补充单位

    • supplementary_units_amount integer

      补充单位数量

    • country_of_origin string Required

      原产国

    • dangerous_goods_code string

      危险品代码

    • ecommerce_ref string

      电商参考号

    • ecommerce_url string(uri)

      电商 URL

    • documents array[object]

      相关文档

      Hide documents attributes Show documents attributes object
      • category string

        文档类别

        Values are transport, commercial, or other.

      • type_code string Required

        文档类型代码 N380=Invoice, N740=Air Waybill

      • reference_number string Required

        参考号码

      • valid_from string(date-time) Required

        有效期开始时间

      • file_url string(uri)

        文件 URL

    • tax_lines array[object]

      税金明细

  • tax_lines array[object]

    税金明细

Responses

  • 201 application/json

    申报创建成功

    Hide response attributes Show response attributes object
    • id integer(int64)
    • reference string

      系统生成的申报号

    • client_ref string Required

      客户参考号 (8-32 位,仅包含字母、数字、连字符和下划线)

      Minimum length is 8, maximum length is 32. Format should match the following pattern: ^[A-Z0-9\-_]+$.

    • lrn string

      申报参考号 (8-32 位,仅包含字母、数字、连字符和下划线)

      注意: 目前系统都支持自定义,但不保证未来所有系统都支持

      Minimum length is 8, maximum length is 32. Format should match the following pattern: ^[A-Z0-9\-_]+$.

    • mrn string

      参考号(海关返回)

    • template_code string Required

      申报模板代码 (8-32 位,仅包含字母、数字、连字符和下划线)

      Minimum length is 8, maximum length is 32. Format should match the following pattern: ^[A-Z0-9\-_]+$.

    • declaration_type string Required

      申报类型 (IM=进口,EX=出口)

      Values are IM or EX.

    • additional_declaration_type string Required

      附加申报类型 (A=标准申报,D=预申报)

      Values are A or D.

    • presentation_mode string

      呈报(确认)模式 (conditional, scheduled)

    • provisional_validation_datetime string(date-time)

      暂定确认时间(预申报场景)

    • declaration_office_code string Required
    • presentation_office_code string

      呈报办公室代码

    • shipment_carrier_ref string

      承运人参考号

    • mode_at_border string

      边境运输方式

      Values are sea, rail, road, air, or post.

    • inland_mode string

      内陆运输方式

    • country_of_dispatch_code string Required

      出口国代码 (ISO3166 alpha2 代码)

      Minimum length is 2, maximum length is 2. Format should match the following pattern: ^[A-Z]{2}$.

    • country_of_destination_code string Required

      进口国代码 (ISO3166 alpha2 代码)

      Minimum length is 2, maximum length is 2. Format should match the following pattern: ^[A-Z]{2}$.

    • gross_weight_in_kg number(float) Required

      总毛重(千克,必须大于 0)

      Minimum value is 0.001.

    • total_packages integer Required

      总包装数(必须大于 0)

      Minimum value is 1. Default value is 1.

    • unique_consignment_reference string

      唯一托运参考号

    • transaction_nature_code string

      交易性质代码 (WCO TDED 4423)

      • direct_sale (11): 直接销售/采购
      • consumer_sale (12): 与消费者直接交易(电商) [默认]
      • return_goods (21): 退货
      • other_transaction (99): 其他

      Values are direct_sale, consumer_sale, return_goods, replacement_returned, replacement_not_returned, transfer_to_warehouse, consignment, financial_leasing, ownership_transfer_free, processing_expected_return, processing_not_expected_return, after_processing_return, after_processing_not_return, temporary_movement, construction_materials, rental_over_24_months, or other_transaction. Default value is consumer_sale.

    • freight_payment_method_code string

      运费支付方式代码 (WCO TDED 4215)

      • cash (A): 现金支付
      • credit_card (B): 信用卡
      • cheque (C): 支票
      • other (D): 其他
      • electronic (H): 电子支付
      • account (Y): 承运人账户
      • not_prepaid (Z): 未预付

      Values are cash, credit_card, cheque, other, electronic, account, or not_prepaid.

    • location_of_goods_code string

      货物位置代码 (3 位 IATA 机场代码或 UN/LOCODE 格式) https://datahub.io/core/un-locode

      Format should match the following pattern: ^([A-Z]{3}|[A-Z]{2}[A-Z0-9]{3,})$.

    • location_of_goods_type string

      货物位置类型

    • location_of_goods object

      货物位置详情

      Hide location_of_goods attributes Show location_of_goods attributes object
      • country_code string
      • postal_code string
      • street_number string
      • city string
      • street_name string
    • delivery_terms string

      Values are EXW, FCA, CPT, CIP, DAP, DPU, DDP, DDU, FAS, FOB, CFR, or CIF.

    • delivery_terms_location string

      交货条款地点

    • currency_code string Required

      货币代码 (ISO4217 三字母代码) https://www.iban.com/currency-codes

      Format should match the following pattern: ^[A-Z]{3}$. Default value is EUR.

    • currency_exchange_rate number(float)

      汇率

    • ioss_number string

      IOSS 号码 (10-16 位,仅包含字母、数字和连字符)

      Minimum length is 10, maximum length is 16. Format should match the following pattern: ^[A-Z0-9\-]+$.

    • deferred_payment_account string

      延期付款账户

    • status string

      申报状态。注意:一旦提交到海关,状态将不可逆地改变

      Values are pending, submitted, acknowledged, under_review, additional_info_required, customs_control, accepted, released, rejected, confiscated, suspended, cancelling, cancelled, archived, or exception.

    • reject_reason string

      拒绝原因

    • importer object
      Hide importer attributes Show importer attributes object
      • id integer(int64)
      • name string Required
      • attention_to string
      • street_address string Required
      • city string Required
      • state string
      • postal_code string Required
      • country_code string Required

        ISO3166 alpha2 code

      • email string
      • phone string
      • eori_number string
      • vat_number string
      • tax_id string
    • exporter object
      Hide exporter attributes Show exporter attributes object
      • id integer(int64)
      • name string Required
      • attention_to string
      • street_address string Required
      • city string Required
      • state string
      • postal_code string Required
      • country_code string Required

        ISO3166 alpha2 code

      • email string
      • phone string
      • eori_number string
      • vat_number string
      • tax_id string
    • buyer object
      Hide buyer attributes Show buyer attributes object
      • id integer(int64)
      • name string Required
      • attention_to string
      • street_address string Required
      • city string Required
      • state string
      • postal_code string Required
      • country_code string Required

        ISO3166 alpha2 code

      • email string
      • phone string
      • eori_number string
      • vat_number string
      • tax_id string
    • seller object
      Hide seller attributes Show seller attributes object
      • id integer(int64)
      • name string Required
      • attention_to string
      • street_address string Required
      • city string Required
      • state string
      • postal_code string Required
      • country_code string Required

        ISO3166 alpha2 code

      • email string
      • phone string
      • eori_number string
      • vat_number string
      • tax_id string
    • declarant object
      Hide declarant attributes Show declarant attributes object
      • id integer(int64)
      • name string Required
      • attention_to string
      • street_address string Required
      • city string Required
      • state string
      • postal_code string Required
      • country_code string Required

        ISO3166 alpha2 code

      • email string
      • phone string
      • eori_number string
      • vat_number string
      • tax_id string
    • representative object
      Hide representative attributes Show representative attributes object
      • id integer(int64)
      • name string Required
      • attention_to string
      • street_address string Required
      • city string Required
      • state string
      • postal_code string Required
      • country_code string Required

        ISO3166 alpha2 code

      • email string
      • phone string
      • eori_number string
      • vat_number string
      • tax_id string
    • documents array[object]

      相关文档

      Hide documents attributes Show documents attributes object
      • id integer(int64)
      • category string

        文档类别

        Values are transport, commercial, or other.

      • type_code string Required

        文档类型代码 N380=Invoice, N740=Air Waybill

      • reference_number string Required

        参考号码

      • valid_from string(date-time) Required

        有效期开始时间

      • file_url string(uri)

        文件 URL

    • items array[object]

      商品明细 (1-999 个商品)

      At least 1 but not more than 999 elements.

      Hide items attributes Show items attributes object
      • id integer(int64)
      • description string Required

        商品描述

      • commodity_code string Required

        商品编码

        Minimum length is 6, maximum length is 12.

      • national_additional_codes array[string]

        国家附加代码 (CANA - Code Additionnel National) 用于 CommodityCode/NationalAdditionalCode,标识税制相关的国家级商品分类扩展代码。 法国示例: T146, T153, V002, Q210 荷兰: 不适用 (荷兰无此字段)

      • additional_reference_codes array[string]

        附加参考代码 (Y-codes / Document Type Codes) 用于 AdditionalReference,标识监管合规相关的文档类型代码。 格式: "代码" 或 "代码:参考编号",如 "Y160:EXEMPT" 表示 type=Y160, referenceNumber=EXEMPT。 仅含代码时不填 referenceNumber。 荷兰示例: Y160, Y032, Y069 法国示例: Y160:EXEMPT, Y032

      • current_procedure_code string

        当前海关程序代码 (WCO TDED 9033)

        • free_circulation (40): 自由流通放行并国内消费
        • free_circulation_vat_exempt (42): 自由流通(VAT豁免,转运其他成员国)
        • free_circulation_end_use (44): 自由流通(特定最终用途)
        • ioss_import (48): IOSS方案进口
        • inward_processing (51): 内向加工
        • temporary_admission (53): 临时进口
        • customs_warehouse (71): 关税仓库
        • free_zone (78): 自由区

        Values are free_circulation, free_circulation_vat_exempt, free_circulation_end_use, ioss_import, inward_processing, temporary_admission, customs_warehouse, or free_zone.

      • additional_procedure_codes array[string]

        附加程序代码

      • previous_procedure_code string

        前一海关程序代码 (WCO TDED 9033)

        • none (00): 无(直接从第三国进口) [默认]
        • free_zone (07): 自由区
        • temporary_admission (21): 临时进口
        • free_circulation (40): 自由流通
        • inward_processing (51): 内向加工
        • customs_warehouse (71): 关税仓库

        Values are none, free_zone, temporary_admission, free_circulation, inward_processing, or customs_warehouse. Default value is none.

      • payment_method_code string

        税费支付方式代码 (WCO TDED 4467)

        • cash (A): 现金支付
        • credit (B): 信用证
        • deferred (C): 账户扣款/延期 [默认]
        • electronic (D): 电子支付
        • guarantee (E): 担保

        Values are cash, credit, deferred, electronic, or guarantee. Default value is deferred.

      • valuation_method_code string

        估价方法代码 (WCO TDED 5509)

        • transaction_value (1): 成交价格法 [默认]
        • identical_goods (2): 相同货物成交价格
        • similar_goods (3): 类似货物成交价格
        • deductive_method (4): 倒扣价格法
        • computed_method (5): 计算价格法
        • fallback_method (6): 合理方法

        Values are transaction_value, identical_goods, similar_goods, deductive_method, computed_method, or fallback_method. Default value is transaction_value.

      • currency_code string Required

        货币代码 (ISO4217 三字母代码)

        Format should match the following pattern: ^[A-Z]{3}$. Default value is EUR.

      • intrinsic_value decimal Required

        内在价值总价(该商品的总价值,非单价)

      • freight_cost integer

        运费总价(该商品的总运费,非单价)

      • insurance_cost integer

        保险费总价(该商品的总保险费,非单价)

      • gross_weight_in_grams integer Required

        毛重总重(克,该商品的总毛重,非单件重量)

      • net_weight_in_grams integer Required

        净重总重(克,该商品的总净重,非单件重量)

      • gross_weight_in_kg number(float)

        毛重总重(千克,该商品的总毛重,非单件重量)

      • net_weight_in_kg number(float)

        净重总重(千克,该商品的总净重,非单件重量)

      • package_type string

        包装类型代码 (WCO TDED 7065, UN/ECE Rec 21)

        • package (PK): 包装(通用) [默认]
        • carton (CT): 纸箱
        • box (BX): 箱子
        • bag (BG): 袋子
        • envelope (EN): 信封
        • parcel (PC): 小包裹
        • unpacked (NE): 未包装

        Values are package, carton, box, bag, crate, pallet, envelope, parcel, roll, tube, drum, unpacked, unpacked_single, or unpacked_multiple. Default value is package.

      • number_of_packages integer

        包装数量

        Default value is 1.

      • shipping_marks string

        运输标记

      • quantity integer Required

        数量

      • supplementary_units string

        补充单位

      • supplementary_units_amount integer

        补充单位数量

      • country_of_origin string Required

        原产国

      • dangerous_goods_code string

        危险品代码

      • ecommerce_ref string

        电商参考号

      • ecommerce_url string(uri)

        电商 URL

      • documents array[object]

        相关文档

        Hide documents attributes Show documents attributes object
        • id integer(int64)
        • category string

          文档类别

          Values are transport, commercial, or other.

        • type_code string Required

          文档类型代码 N380=Invoice, N740=Air Waybill

        • reference_number string Required

          参考号码

        • valid_from string(date-time) Required

          有效期开始时间

        • file_url string(uri)

          文件 URL

      • tax_lines array[object]

        税金明细

        Hide tax_lines attributes Show tax_lines attributes object
        • id integer(int64)

          税金行 ID

        • type_code string Required

          税金类型代码

        • category string Required

          税金类别

          Values are duty or vat.

        • regime_code string

          制度代码

        • rate number(float) Required

          税率

        • currency string Required

          货币代码

        • base_amount number(float)

          计税基础金额

        • deduct_amount number(float)

          扣除金额

        • amount number(float) Required

          税金金额

        • created_at string(date-time)

          创建时间

        • updated_at string(date-time)

          更新时间

    • tax_lines array[object]

      税金明细

      Hide tax_lines attributes Show tax_lines attributes object
      • id integer(int64)

        税金行 ID

      • type_code string Required

        税金类型代码

      • category string Required

        税金类别

        Values are duty or vat.

      • regime_code string

        制度代码

      • rate number(float) Required

        税率

      • currency string Required

        货币代码

      • base_amount number(float)

        计税基础金额

      • deduct_amount number(float)

        扣除金额

      • amount number(float) Required

        税金金额

      • created_at string(date-time)

        创建时间

      • updated_at string(date-time)

        更新时间

    • tax_assessment_notice_url string

      PDF 税单链接

    • created_at string(date-time)

      创建时间

    • updated_at string(date-time)

      更新时间

    • scheduled_at string(date-time)

      计划时间

    • submitted_at string(date-time)

      提交时间

    • accepted_at string(date-time)

      接受时间

    • inspected_at string(date-time)

      查验时间

    • finalized_at string(date-time)

      完结时间

    • released_at string(date-time)

      放行时间

    • cancelled_at string(date-time)

      取消时间

    • goods_presentation_due_date string(date)

      货物呈报截止日期

    • goods_presentation_effective_date string(date-time)

      货物呈报生效日期

    • cancellation_requested_at string(date-time)

      取消请求时间

    • rejected_at string(date-time)

      拒绝时间

  • 400 application/json

    请求参数错误

    Hide response attributes Show response attributes object
    • error string
    • errors object
      Hide errors attribute Show errors attribute object
      • * array[string] Additional properties
  • 401

    未授权

  • 422 application/json

    验证失败

    Hide response attributes Show response attributes object
    • error string
    • errors object
      Hide errors attribute Show errors attribute object
      • * array[string] Additional properties
POST /declarations
curl \
 --request POST 'https://app-sandbox.gutline.eu/api/v1/declarations' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"buyer":{"city":"Rotterdam","name":"Import Company B.V.","postal_code":"3000AA","country_code":"NL","street_address":"Buyer Street 1"},"items":[{"quantity":100,"description":"T-shirts","currency_code":"EUR","commodity_code":"6109100010","net_weight_in_kg":14.0,"country_of_origin":"CN","gross_weight_in_kg":15.5,"dangerous_goods_code":null,"intrinsic_value_cents":150000}],"seller":{"city":"Shanghai","name":"Shanghai Exports Ltd","postal_code":"200000","country_code":"CN","street_address":"Seller Street 1"},"exporter":{"city":"Shanghai","name":"Shanghai Exports Ltd","postal_code":"200000","country_code":"CN","street_address":"Seller Street 1"},"importer":{"city":"Rotterdam","name":"Import Company B.V.","email":"hans@test.com","phone":"+49 30 123456","eori_number":"DE123456789","postal_code":"3000AA","attention_to":"Hans Mueller","country_code":"NL","street_address":"Importer Street 1"},"documents":[{"category":"supporting","type_code":"N380","valid_from":"2025-10-01","reference_number":"INV-SH-2025-001"}],"client_ref":"NLH1-1727866165","ioss_number":"IM3720014058","currency_code":"EUR","template_code":"NLAMS_H1","delivery_terms":"DDP","mode_at_border":"air","total_packages":10,"declaration_type":"IM","location_of_goods":{"postal_code":"1118 CP","country_code":"NL","street_number":"1"},"gross_weight_in_kg":15.5,"declaration_office_code":"NL000432","delivery_terms_location":"NLAMS","country_of_dispatch_code":"CN","presentation_office_code":"NL000432","additional_declaration_type":"A","country_of_destination_code":"NL","provisional_validation_datetime":"2025-10-01T12:00:00Z"}'
Request example
{
  "buyer": {
    "city": "Rotterdam",
    "name": "Import Company B.V.",
    "postal_code": "3000AA",
    "country_code": "NL",
    "street_address": "Buyer Street 1"
  },
  "items": [
    {
      "quantity": 100,
      "description": "T-shirts",
      "currency_code": "EUR",
      "commodity_code": "6109100010",
      "net_weight_in_kg": 14.0,
      "country_of_origin": "CN",
      "gross_weight_in_kg": 15.5,
      "dangerous_goods_code": null,
      "intrinsic_value_cents": 150000
    }
  ],
  "seller": {
    "city": "Shanghai",
    "name": "Shanghai Exports Ltd",
    "postal_code": "200000",
    "country_code": "CN",
    "street_address": "Seller Street 1"
  },
  "exporter": {
    "city": "Shanghai",
    "name": "Shanghai Exports Ltd",
    "postal_code": "200000",
    "country_code": "CN",
    "street_address": "Seller Street 1"
  },
  "importer": {
    "city": "Rotterdam",
    "name": "Import Company B.V.",
    "email": "hans@test.com",
    "phone": "+49 30 123456",
    "eori_number": "DE123456789",
    "postal_code": "3000AA",
    "attention_to": "Hans Mueller",
    "country_code": "NL",
    "street_address": "Importer Street 1"
  },
  "documents": [
    {
      "category": "supporting",
      "type_code": "N380",
      "valid_from": "2025-10-01",
      "reference_number": "INV-SH-2025-001"
    }
  ],
  "client_ref": "NLH1-1727866165",
  "ioss_number": "IM3720014058",
  "currency_code": "EUR",
  "template_code": "NLAMS_H1",
  "delivery_terms": "DDP",
  "mode_at_border": "air",
  "total_packages": 10,
  "declaration_type": "IM",
  "location_of_goods": {
    "postal_code": "1118 CP",
    "country_code": "NL",
    "street_number": "1"
  },
  "gross_weight_in_kg": 15.5,
  "declaration_office_code": "NL000432",
  "delivery_terms_location": "NLAMS",
  "country_of_dispatch_code": "CN",
  "presentation_office_code": "NL000432",
  "additional_declaration_type": "A",
  "country_of_destination_code": "NL",
  "provisional_validation_datetime": "2025-10-01T12:00:00Z"
}
Response examples (201)
{
  "id": 42,
  "reference": "DEC2024001",
  "client_ref": "NLH1-1727866165",
  "lrn": "LRN123456789",
  "mrn": "MRN123456789",
  "template_code": "NLAMS_H1",
  "declaration_type": "IM",
  "additional_declaration_type": "A",
  "presentation_mode": "conditional",
  "provisional_validation_datetime": "2026-05-04T09:42:00Z",
  "declaration_office_code": "NL000432",
  "presentation_office_code": "NL000432",
  "shipment_carrier_ref": "CARRIER_REF_001",
  "mode_at_border": "air",
  "inland_mode": "road",
  "country_of_dispatch_code": "CN",
  "country_of_destination_code": "NL",
  "gross_weight_in_kg": 15.5,
  "total_packages": 1,
  "unique_consignment_reference": "UCR123456789",
  "transaction_nature_code": "consumer_sale",
  "freight_payment_method_code": "electronic",
  "location_of_goods_code": "AMS",
  "location_of_goods_type": "string",
  "location_of_goods": {
    "country_code": "NL",
    "postal_code": "1012 AB",
    "street_number": "123",
    "city": "Amsterdam",
    "street_name": "Main Street"
  },
  "delivery_terms": "DDP",
  "delivery_terms_location": "NLAMS",
  "currency_code": "EUR",
  "currency_exchange_rate": 1.0,
  "ioss_number": "IM3720014058",
  "deferred_payment_account": "ACCOUNT123",
  "status": "draft",
  "reject_reason": "string",
  "importer": {
    "id": 42,
    "name": "Import Company B.V.",
    "attention_to": "Attention to",
    "street_address": "123 Main Street",
    "city": "Rotterdam",
    "state": "North Holland",
    "postal_code": "3000AA",
    "country_code": "NL",
    "email": "john@example.com",
    "phone": "+31 20 1234567",
    "eori_number": "DE123456789",
    "vat_number": "NL123456789B01",
    "tax_id": "123456789"
  },
  "exporter": {
    "id": 42,
    "name": "Import Company B.V.",
    "attention_to": "Attention to",
    "street_address": "123 Main Street",
    "city": "Rotterdam",
    "state": "North Holland",
    "postal_code": "3000AA",
    "country_code": "NL",
    "email": "john@example.com",
    "phone": "+31 20 1234567",
    "eori_number": "DE123456789",
    "vat_number": "NL123456789B01",
    "tax_id": "123456789"
  },
  "buyer": {
    "id": 42,
    "name": "Import Company B.V.",
    "attention_to": "Attention to",
    "street_address": "123 Main Street",
    "city": "Rotterdam",
    "state": "North Holland",
    "postal_code": "3000AA",
    "country_code": "NL",
    "email": "john@example.com",
    "phone": "+31 20 1234567",
    "eori_number": "DE123456789",
    "vat_number": "NL123456789B01",
    "tax_id": "123456789"
  },
  "seller": {
    "id": 42,
    "name": "Import Company B.V.",
    "attention_to": "Attention to",
    "street_address": "123 Main Street",
    "city": "Rotterdam",
    "state": "North Holland",
    "postal_code": "3000AA",
    "country_code": "NL",
    "email": "john@example.com",
    "phone": "+31 20 1234567",
    "eori_number": "DE123456789",
    "vat_number": "NL123456789B01",
    "tax_id": "123456789"
  },
  "declarant": {
    "id": 42,
    "name": "Import Company B.V.",
    "attention_to": "Attention to",
    "street_address": "123 Main Street",
    "city": "Rotterdam",
    "state": "North Holland",
    "postal_code": "3000AA",
    "country_code": "NL",
    "email": "john@example.com",
    "phone": "+31 20 1234567",
    "eori_number": "DE123456789",
    "vat_number": "NL123456789B01",
    "tax_id": "123456789"
  },
  "representative": {
    "id": 42,
    "name": "Import Company B.V.",
    "attention_to": "Attention to",
    "street_address": "123 Main Street",
    "city": "Rotterdam",
    "state": "North Holland",
    "postal_code": "3000AA",
    "country_code": "NL",
    "email": "john@example.com",
    "phone": "+31 20 1234567",
    "eori_number": "DE123456789",
    "vat_number": "NL123456789B01",
    "tax_id": "123456789"
  },
  "documents": [
    {
      "id": 42,
      "category": "transport",
      "type_code": "N740",
      "reference_number": "REF123456",
      "valid_from": "2026-05-04T09:42:00Z",
      "file_url": "https://example.com"
    }
  ],
  "items": [
    {
      "id": 42,
      "description": "T-shirts",
      "commodity_code": "6109100010",
      "national_additional_codes": [
        "T146",
        "T153"
      ],
      "additional_reference_codes": [
        "Y160:EXEMPT",
        "Y032"
      ],
      "current_procedure_code": "free_circulation",
      "additional_procedure_codes": [
        "F48",
        "C07"
      ],
      "previous_procedure_code": "none",
      "payment_method_code": "deferred",
      "valuation_method_code": "transaction_value",
      "currency_code": "EUR",
      "intrinsic_value": 1500.0,
      "freight_cost": 0.5,
      "insurance_cost": 0.25,
      "gross_weight_in_grams": 15500,
      "net_weight_in_grams": 14000,
      "gross_weight_in_kg": 15.5,
      "net_weight_in_kg": 14.0,
      "package_type": "package",
      "number_of_packages": 1,
      "shipping_marks": "FRAGILE",
      "quantity": 1,
      "supplementary_units": "PCE",
      "supplementary_units_amount": 1,
      "country_of_origin": "CN",
      "dangerous_goods_code": "UN1234",
      "ecommerce_ref": "EC123456",
      "ecommerce_url": "https://example.com/product/123",
      "documents": [
        {
          "id": 42,
          "category": "transport",
          "type_code": "N740",
          "reference_number": "REF123456",
          "valid_from": "2026-05-04T09:42:00Z",
          "file_url": "https://example.com"
        }
      ],
      "tax_lines": [
        {
          "id": 42,
          "type_code": "VAT",
          "category": "vat",
          "regime_code": "01",
          "rate": 0.21,
          "currency": "EUR",
          "base_amount": 100.0,
          "deduct_amount": 0.0,
          "amount": 21.0,
          "created_at": "2026-05-04T09:42:00Z",
          "updated_at": "2026-05-04T09:42:00Z"
        }
      ]
    }
  ],
  "tax_lines": [
    {
      "id": 42,
      "type_code": "VAT",
      "category": "vat",
      "regime_code": "01",
      "rate": 0.21,
      "currency": "EUR",
      "base_amount": 100.0,
      "deduct_amount": 0.0,
      "amount": 21.0,
      "created_at": "2026-05-04T09:42:00Z",
      "updated_at": "2026-05-04T09:42:00Z"
    }
  ],
  "tax_assessment_notice_url": "string",
  "created_at": "2026-05-04T09:42:00Z",
  "updated_at": "2026-05-04T09:42:00Z",
  "scheduled_at": "2026-05-04T09:42:00Z",
  "submitted_at": "2026-05-04T09:42:00Z",
  "accepted_at": "2026-05-04T09:42:00Z",
  "inspected_at": "2026-05-04T09:42:00Z",
  "finalized_at": "2026-05-04T09:42:00Z",
  "released_at": "2026-05-04T09:42:00Z",
  "cancelled_at": "2026-05-04T09:42:00Z",
  "goods_presentation_due_date": "2026-05-04",
  "goods_presentation_effective_date": "2026-05-04T09:42:00Z",
  "cancellation_requested_at": "2026-05-04T09:42:00Z",
  "rejected_at": "2026-05-04T09:42:00Z"
}
Response examples (400)
{
  "error": "validation_failed",
  "errors": {
    "lrn": [
      "can't be blank"
    ],
    "client_ref": [
      "has already been taken"
    ]
  }
}
Response examples (422)
{
  "error": "validation_failed",
  "errors": {
    "lrn": [
      "can't be blank"
    ],
    "client_ref": [
      "has already been taken"
    ]
  }
}