Orders
Uploading orders to Gsped
This endpoint is used to upload orders and their details to Gsped so that they can be fulfilled via API or via the web interface, with the resulting generation of the shipping labels.
It is very useful when you have to manage several order fulfilment points that use the Gsped web interface but for which a connector for automatic order download cannot be activated.
Retrieve order list
GET https://api.gsped.it/[INSTANCE]/Orders
Headers
x-api-key*
String
APIKEY provided by Gsped
Query Parameters
id
int[]
selects if id IN [id, id, ...]
client_id
int[]
selects if client_id IN [client_id, client_id, ...] Any wrong or not permitted client_ids are ignored
order_ref
string[]
selects if order_ref IN [order_ref, order_ref, ...] Each string max 50 char
string
selects if email = email Max 50 char
data_ordine_da
Y-m-d
Selects if data_ordine ≥ data_ordine_da
data_ordine_a
Y-m-d
Selects if data_ordine <= data_ordine_a
status
string[]
selects if status IN [status, status, ...] Max 3 char
exclude_status
string[]
selects if status NOT IN [status, status, ...] Max 3 char
corriere
int[]
selects if corriere IN [corriere, corriere, ...]
exclude_corriere
int[]
selects if corriere NOT IN [corriere, corriere, ...]
invoice_number
string[]
selects if invoice_number IN [invoice_number, invoice_number, ...]
invoice_date_da
Y-m-d
Selects if invoice_date ≥ invoice_date_da
invoice_date_a
Y-m-d
Selects if invoice_date <= invoice_date_a
withDetails
1 | 0
If 1, the order details are also returned
perPage
1...100
number of results per page requested
page
int
page number requested
orderBy
id | client_id | order_ref | email | data_ordine | status | corriere | invoice_number | invoice_date
name of the field to sort by (default id)
order
ASC | DESC
sort direction (default DESC)
Example code
Retrieve an order and its details
GET https://api.gsped.it/[INSTANCE]/Orders/[ID_ORDINE]
Retrieves an order and its details from Gsped
Headers
x-api-key*
String
APIKEY provided by Gsped
The response also contains rcpt_type, the shipment fields vat_seller, sender_eori, rcpt_eori, ddt_num, tipo_incasso, chi_paga, addebito_dogana, incoterm and parties (null if not set) and, for each detail in rows, id and dati_doganali. The id identifies the detail to edit in the PATCH.
Example code snippets
Upload orders and details
POST https://api.gsped.it/[INSTANCE]/Orders
Lets you upload orders and their details to Gsped
Headers
x-api-key*
String
APIKEY provided by Gsped
Request Body
client_id*
Int
Client ID Gsped
zip*
String
Recipient zip code
city*
String
Recipient city
address*
String
Recipient address
name*
String
Recipient name
order_ref*
String
Order reference
email*
String
Recipient email address
country*
String
Country code iso 2 char
province*
String
Province or State code
insurance
Float
Insured value
customs_value
Float
Customs value
cod
Float
Cash on delivery (COD) value
phone*
String
Phone number
rows.description
String
Order detail description
warehouse
String
Warehouse
notes
String
Order notes
rows.qty
Int
Detail quantity
rows.sku
String
Detail SKU
rows.country_of_origin
String
Country code iso 2 char of origin of the goods
invoice_date
String
Date of the order invoice
invoice_number
String
Number of the order invoice
rows.hs_code
String
Detail HS code
rows.barcode_riga
String
Barcode string of the single item
rows.prezzo_singolo
String
Single item price
rows.peso_riga
String
Single item weight
corriere
int
Gsped courier ID
servizio
int
Gsped courier service ID
rcpt_type
int
Recipient type: 0 not specified, 1 private, 2 business
rows.dati_doganali
Object
Customs data of the detail, in dati_doganali.pid the product codes, see EU customs reform 2026
vat_code
String
Recipient VAT number, max 20 char
vat_seller
String
Seller VAT number, max 20 char
sender_eori
String
Sender EORI number, max 20 char
rcpt_eori
String
Recipient EORI number, max 20 char
ddt_num
Int
Number of the shipment's transport document, max 15 digits
chi_paga
Int
Carriage: 0 paid, 1 forward
addebito_dogana
Int
Who pays duties and customs charges: 0 default, 1 sender, 2 third party. mittente, destinatario, terzo are also accepted
Example code snippets
Edit orders and details of an existing order
PATCH https://api.gsped.it/[INSTANCE]/Orders/[ID_ORDINE]
Lets you edit an order and its details on Gsped
Headers
x-api-key*
String
APIKEY provided by Gsped
Request Body
client_id*
Int
Client ID Gsped
name*
String
Recipient name
order_ref*
String
Order reference
address*
String
Recipient address
cod
Float
Cash on delivery (COD) value
phone*
String
Phone number
email*
String
Recipient email address
country*
String
Country code iso 2 char
province*
String
Province or State code
zip*
String
Recipient zip code
city*
String
Recipient city
rows.description
String
Order detail description
warehouse
String
Warehouse
notes
String
Order notes
invoice_number
String
Number of the order invoice
invoice_date
String
Date of the order invoice
insurance
Float
Insured value
customs_value
Float
Customs value
rows.hs_code
String
Detail HS code
rows.qty
Int
Detail quantity
rows.sku
String
Detail SKU
rows.country_of_origin
String
Country code iso 2 char of origin of the goods
corriere
Int
Gsped courier ID
servizio
Int
Gsped courier service ID
rcpt_type
Int
Recipient type: 0 not specified, 1 private, 2 business. If not sent it stays unchanged
rows.id
Int
ID of the detail to edit, returned when retrieving the order
rows.dati_doganali
Object
Customs data of the detail, in dati_doganali.pid the product codes, see EU customs reform 2026
vat_code
String
Recipient VAT number, max 20 char
vat_seller
String
Seller VAT number, max 20 char
sender_eori
String
Sender EORI number, max 20 char
rcpt_eori
String
Recipient EORI number, max 20 char
ddt_num
Int
Number of the shipment's transport document, max 15 digits
chi_paga
Int
Carriage: 0 paid, 1 forward
addebito_dogana
Int
Who pays duties and customs charges: 0 default, 1 sender, 2 third party. mittente, destinatario, terzo are also accepted
Example code snippets
Behaviour when the order is linked to a shipment still to be confirmed: if the shipment is non-EU and the courier supports CINs, if the courier supports the shipmentPatch of CIN data, the update is performed on the courier; otherwise the shipment is set to error because it must be regenerated with the new order data.
Last updated
