General export declarations: HTTP integrations for after-sales questions

Review HTTP integrations for after-sales questions in General export declarations. Check input mappings, source evidence and failure handling before use.

What the documents look like

General trade export declaration produces, per shipment, an export declaration form, a commercial invoice, a packing list and a contract. Data sources named in the brief include China International Trade Single Window, the customs code library, freight forwarder bills of lading and the enterprise ERP. Export declaration also affects export tax refund voucher matching, and declaration errors can lead to return-and-inspection handling and blocked refunds. This page covers one slice of that work: how external systems receive declaration and invoice data over HTTP, how status values come back, and how those returned values are referenced when answering after-sales questions. The brief states that data updates per shipment. Integration calls sit at the various points where documents move between parties.

The HTTP module sends a request to a given address. Params carry path parameters and are common in GET requests. Body carries the request payload and is common in POST and PUT requests. Headers carry special information. All three data areas and the URL can reference variables through {{}}. Variables come from global variables, system variables and upstream node outputs. The documented system variables are appId, chatId, responseChatItemId, variables, cTime and histories. The document states that chatId and responseChatItemId do not exist in test mode. Returned values are extracted by JSON path or by JS object access rules applied to the converted format. When the output type is set to string, the value for the corresponding key is converted to a JSON string. On the chat interface, the documented guidance is to pass appId in the request body when calling chat/completions, with APIKey authentication. The model and temperature fields passed in are ineffective because the orchestration decides them. Setting detail=true returns responseData, from which the tokens values can be read and the consumption calculated manually. An interactive node response returns interactive containing only type and params; internal runtime fields such as entryNodeIds, memoryEdges, nodeOutputs and nodeResponseId are not returned. Continuing a form input requires the chatId to stay consistent and the input content to be serialized as an object string in messages.

Constraints at the HTTP integrations step

The integration step carries the same document identities as the rest of the declaration flow, so any returned status has to be matched against the specific declaration form, invoice, packing list and contract it belongs to. A request that leaves the platform is not the same fact as an external system accepting it. The brief notes that declaration errors can lead to return-and-inspection handling and blocked refunds, which raises the cost of treating a sent request as a settled outcome.

A hypothetical paper exercise sample follows. A document clerk at a foreign trade company, working on order fulfilment and after-sales questions, plans to push a batch of export declaration data to an external freight forwarder system. The source text supplied for checking reads: "Commercial invoice number INV-2031, contract number CT-2031, packing list number PL-2031, export declaration form number D-2031, declaration date 10 March 2025, declaration status declared." The proposed sentence reads: "This batch of goods has been released and can be arranged for shipment." The request awaiting judgement reads: "Please push the above declared data to the freight forwarder system through the HTTP interface and return the acceptance result." The source text records only the declared status. It does not record release, shipment or an acceptance result. An acceptance result belongs to the external system and can only be confirmed once the interface actually returns a value.

Configuration and implementation checks

Configuration itemHypothetical starting point for this exerciseHow to check it and on what basis
Request address and methodChoose the address and method according to the external freight forwarder system documentThe address can reference a variable; the method has to match the external interface contract
Headers authenticationReference a token variable in Bearer formAuthentication credentials are injected through secure configuration and are not written into public samples
Body structureOrganise JSON according to the external interface field requirementsBody takes effect only under the relevant request type; check each field against the contract
Variable referencesReference the invoice number, contract number and declaration form number from upstream node outputsCheck each passed value individually; the source is a global variable, a system variable or an upstream node output
Returned value extractionExtract the acceptance status field by JSON pathWith output type string, the value becomes a JSON string; fill the key by JS object access rules
Debug identity fieldschatId and responseChatItemId do not exist in test modeAn empty value in test mode is not treated as a business fault

Three common errors

  1. Treating "declared" as "released". The source text records only the declaration status as declared and does not record release or shipment. The check compares the status field in the source text with the conclusion in the proposed sentence; the appearance of release or shipment wording without a corresponding record in the source text means the sentence goes beyond the source text.
  2. Treating an interface request as external acceptance. The request awaiting judgement asks for an acceptance result to be returned, and sending a request is not the same fact as the other side accepting it. The check compares whether an actual return value from the external interface was obtained; without a returned value, the acceptance status remains unknown.
  3. Treating an empty chatId in test mode as a session fault. The document states that chatId and responseChatItemId do not exist in test mode. The check compares the run mode with the field values; an empty value in test mode is not treated as a business exception.

How to verify the setup

  1. The input is the source text and the proposed sentence "This batch of goods has been released and can be arranged for shipment." Compare whether the source text records release or shipment. The source text records only the declared status, so the conclusion in the proposed sentence is not supported and stays pending verification.
  2. The input is the request awaiting judgement and the return situation of the external interface. Compare whether the other side's acceptance result was obtained. Without a returned value, the acceptance status is unknown and is not judged as accepted or rejected.
  3. The input is a test-mode run record and the values of chatId and responseChatItemId. Compare the run mode with whether the fields exist. In test mode the two fields do not exist, which the document already describes, so a session fault is not concluded from this.

A retrieval or form submission does not by itself establish authorisation, approval or a database write. Any business verification, approval, database write or external synchronisation requires its stated downstream implementation. Where the source text is silent, the gap stays open.