For the complete documentation index, see llms.txt. This page is also available as Markdown.

Shipment References

This endpoint lets you manage multiple references for a shipment.

ShipmentReferences - GET

GET https://api.gsped.it/[INSTANCE]/ShipmentReferences/[ID_SPEDIZIONE]

Retrieves the references associated with the requested shipment

URL Parameters

Name
Type
Description

ISTANZA

String

Name of the instance

ID_SPEDIZIONE

Integer

Unique Gsped ID of the shipment

Headers

Name
Type

x-api-key

String

Apikey provided by Gsped

Response

References retrieved successfully

{
    "primaryReference": "382993",
    "secondaryReference": [
        "ref1",
        "ref2",
        "ref3"
    ]
}

Malformed request

{
    "error": "Dati in ingresso non validi : Il campo 'id spedizione' è obbligatorio."
}

You do not have the permissions required to manage the requested shipment

{
    "error": "Non si hanno i permessi necessari per gestire la spedizione con ID XYZ"
}

There are no references associated with the requested shipment. This code is also returned if the requested shipment does not exist

{
    "error": "Non sono ancora presenti riferimenti per la spedizione con ID XYZ"
}

ShipmentReferences - POST

POST https://api.gsped.it/[INSTANCE]/ShipmentReferences

This endpoint lets you associate one or more references with the shipment.

IMPORTANT:

This endpoint can be called several times on the same shipment to add references as and when needed.

Headers

Name
Value

x-api-key

String

Apikey provided by Gsped

Body

Name
Type
Description

idSpedizione

Integer

Unique Gsped ID of the shipment

references

array

Array containing the references to associate with the shipment. Maximum 20 items!

Example

Response

Reference(s) added successfully

Malformed request, or the request exceeds the number of references allowed for the shipment.

You do not have the permissions required to manage the requested shipment

The shipment to which the references should be associated does not exist

ShipmentReferences - DELETE

DELETE https://api.gsped.it/[INSTANCE]/ShipmentReferences/[ID_SPEDIZIONE]/[REFERENCE]

This endpoint lets you dissociate all the references of a shipment or remove a single reference

URL Parameters

Name
Type
Description

ISTANZA

String

Name of the instance

ID_SPEDIZIONE

integer

Unique Gsped ID of the shipment

REFERENCE

string

Optional parameter. If set, it specifies the reference to dissociate from the shipment. NB: If it is not specified, all references are dissociated NB2: Any special characters must be urlencoded

Headers

Name
Type
Description

x-api-key

string

Apikey provided by Gsped

Response

Reference dissociated successfully

Malformed request

You do not have the permissions required to manage the requested shipment

There are no associated references to delete for the requested shipment. This code is also returned if the requested shipment does not exist