Update ASN Attrs

View as Markdown
### Update ASN Attributes This endpoint allows you to update the attributes of an ASN (Advanced Shipping Notice) by sending a POST request with the necessary details. #### Request **URL:** `{{host}}/apis/external/asn/updateAsnAttrs/` **Method:** POST **Request Body:** ``` json { "asnId": "ASN-KARANDEVENV-000000001", "asnRefNo": "ASN-2025-001", "data": { "shipmentDate": "2025-07-01", "carrier": "DHL", "trackingNumber": "TRK123456789", "items": [ { "productId": "PROD-001", "quantity": 10 } ] }, "type": "asn", "logo": "https://example.com/logo.png", "postingTriggeredAt": 1719825600, "postingErrors": "None", "postingDocNo": "DOC-2025-ASN01", "postingTriggered": true, "postingFailed": false, "postingSynced": true } ``` #### Response **Status:** 200 **Content-Type:** application/json **Example Response Body:** ``` json { "success": true, "id": 13497, "asnId": "ASN-KARANDEVENV-000000001", "refNo": "ASN-2025-001" } ``` #### Response Parameters: - **success**: Indicates whether the update was successful. - **id**: The unique identifier for the updated ASN. - **asnId**: The ASN ID that was updated. - **refNo**: The reference number associated with the ASN. This endpoint is crucial for managing ASN updates, ensuring that all relevant shipping information is accurately reflected in the system. This endpoint allows you to update the attributes of an existing ASN (Advanced Shipping Notice). It requires specific details about the ASN that you wish to update. #### Request **Method:** POST **URL:** `{{host}}/apis/external/asn/updateAsnAttrs/` **Request Body:** The request body must be in JSON format and include the following parameters: - **asnId** (string): The unique identifier for the ASN. - **asnRefNo** (string): The reference number associated with the ASN. - **data** (object): Contains shipment details. - **shipmentDate** (string): The date of shipment. - **carrier** (string): The name of the carrier handling the shipment. - **trackingNumber** (string): The tracking number for the shipment. - **items** (array): A list of items included in the shipment. - **productId** (string): The unique identifier for the product. - **quantity** (integer): The quantity of the product being shipped. - **type** (string): The type of the ASN, typically set to "asn". - **logo** (string): A URL pointing to the logo associated with the ASN. - **postingTriggeredAt** (integer): A timestamp indicating when the posting was triggered. - **postingErrors** (string): Any errors encountered during posting (if applicable). - **postingDocNo** (string): The document number associated with the posting. - **postingTriggered** (boolean): Indicates if the posting was triggered. - **postingFailed** (boolean): Indicates if the posting failed. - **postingSynced** (boolean): Indicates if the posting has been synced. #### Response Upon a successful request, you will receive a response with the following structure: - **success** (boolean): Indicates whether the operation was successful. - **id** (integer): The identifier for the operation. - **asnId** (string): The ASN ID returned by the operation (may be empty). - **refNo** (string): The reference number returned by the operation (may be empty). **Example Response:** ``` json { "success": true, "id": 0, "asnId": "", "refNo": "" } ``` #### Status Codes - **200 OK**: The request was successful, and the ASN attributes were updated. This endpoint allows you to update the attributes of an existing ASN (Advanced Shipping Notice). It is designed to facilitate the modification of shipment details associated with a specific ASN identified by its ID. ### Request **Method**: POST **Endpoint**: `{{host}}/apis/external/asn/updateAsnAttrs/` #### Request Body The request body must be in JSON format and should include the following parameters: - **asnId** (string): The unique identifier for the ASN that you wish to update. - **asnRefNo** (string): The reference number associated with the ASN. - **data** (object): Contains shipment-related information. - **shipmentDate** (string): The date of the shipment (format: YYYY-MM-DD). - **carrier** (string): The name of the shipping carrier. - **trackingNumber** (string): The tracking number provided by the carrier. - **items** (array): A list of items included in the shipment. - **productId** (string): The unique identifier for each product. - **quantity** (integer): The quantity of each product being shipped. - **type** (string): The type of the ASN (e.g., "asn"). - **logo** (string): A URL to the logo associated with the ASN. - **postingTriggeredAt** (integer): A timestamp indicating when the posting was triggered. - **postingErrors** (string): Any errors encountered during posting (if applicable). - **postingDocNo** (string): The document number associated with the posting. - **postingTriggered** (boolean): Indicates whether the posting was triggered. - **postingFailed** (boolean): Indicates whether the posting failed. - **postingSynced** (boolean): Indicates whether the posting has been synchronized. ### Response The response will be returned in JSON format with the following structure: - **success** (boolean): Indicates whether the update operation was successful. - **id** (integer): The identifier for the operation (could be relevant for logging or tracking). - **asnId** (string): The ASN ID that was updated. - **refNo** (string): The reference number associated with the updated ASN. ### Example #### Request Example ``` json { "asnId": "ASN-KARANDEVENV-000000001", "asnRefNo": "ASN-2025-001", "data": { "shipmentDate": "2025-07-01", "carrier": "DHL", "trackingNumber": "TRK123456789", "items": [ { "productId": "PROD-001", "quantity": 10 } ] }, "type": "asn", "logo": "https://example.com/logo.png", "postingTriggeredAt": 1719825600, "postingErrors": "None", "postingDocNo": "DOC-2025-ASN01", "postingTriggered": true, "postingFailed": false, "postingSynced": true } ``` #### Response Example ``` json { "success": true, "id": 0, "asnId": "", "refNo": "" ```

Headers

DICE-APP-IDstringOptional
X-CLIENT-IDstringOptional
X-CLIENT-SECRETstringOptional
statusstringOptional

Request

This endpoint expects an object.
asnIdstringRequired
asnRefNostringRequired
dataobjectRequired
typestringRequired
postingTriggeredAtintegerRequired
postingErrorsstringRequired
postingDocNostringRequired
postingTriggeredbooleanRequired
postingFailedbooleanRequired
postingSyncedbooleanRequired

Response

OK