Last active
January 17, 2025 16:38
-
-
Save zorem/e43aceb2d69284b29ad67ded63755f85 to your computer and use it in GitHub Desktop.
Endpoint – Create a shipment tracking
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//With this endpoint you can add new tracking info to orders: | |
POST /wp-json/wc-ast/v3/orders/<order_id>/shipment-trackings/ | |
curl -X POST https://your-domain.com/wp-json/wc-ast/v3/orders/<order_id>/shipment-trackings | |
-u consumer_key:consumer_secret | |
-H "Content-Type: application/json" | |
-d '{ | |
"tracking_provider": "Fedex", | |
"tracking_number": "12345678", | |
"date_shipped": "2019-03-08",//date_shipped is optional parameter | |
"status_shipped": 1,//status_shipped is optional parameter | |
"replace_tracking": 1,//replace_tracking is optional parameter | |
}' | |
//response example: | |
"Tracking ID: fb7170d97d0e628bc3b565999d07c6a9" |
You will get tracking information in response if successful.
It's a WooCommerce Rest API. You can see documentation on error responses here - https://woocommerce.github.io/woocommerce-rest-api-docs/#errors.
You will get tracking information in response if successful.
It's a WooCommerce Rest API. You can see documentation on error responses here - https://woocommerce.github.io/woocommerce-rest-api-docs/#errors.
Thank you! Sorry to bother you
10
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there documentation on error responses?