Obtenir une commande par ID
Récupère une commande par id, y compris les lignes.
GET
/orders/{orderId}Autorisation
AutorisationJeton Bearer (API key) · headerobligatoireClé API de l’organisation.
Paramètres de chemin
orderIdstringobligatoireRéponses
200Détails de la commande
dataOrderobligatoireCommande. Les dates sont en ISO-8601. Les champs monétaires sont des entiers en centimes.
Afficher les propriétésMasquer les propriétés
idstringIdentifiant
orderIdstringorderDatestring<date-time>transactionDatestring<date-time>paymentMethodstringpaymentStatestringAutorisé:
successfulcancelledtimeoutfailedpendingpaymentBrandstringpriceintegerTotal de la commande en centimes
storestringId du magasin
transactionMessagestringgiftcardIdstringgiftcardFunctionstringdeletedbooleanproductsOrderLine[]Afficher les propriétésMasquer les propriétés
Array of
OrderLineproductIdstringtitlestringpriceintegerTotal de la ligne en centimes.
netPriceintegerMontant net en centimes.
depositintegerConsigne en centimes.
costPriceintegerquantitynumberweightnumbersupplierstringcategorystringtaxintegerMontant de taxe en centimes.
taxRatenumbertypestringp. ex. product, coupon, giftcard.
imageUrlstringoriginalProductIdstringoriginalPriceintegerdiscountnumberundiscountedPriceintegerstorestringprintTicketbooleanflagsanyPrésent lors de l’obtention par id.
resolutionanyOptionnel ; présent lors de l’obtention par id.
403Non autorisé
statusCodeintegerobligatoireCode de statut HTTP
messagestringobligatoireMessage d’erreur lisible
timestampstring<date-time>obligatoirepathstringobligatoireChemin de la requête
404Not found
statusCodeintegerobligatoireCode de statut HTTP
messagestringobligatoireMessage d’erreur lisible
timestampstring<date-time>obligatoirepathstringobligatoireChemin de la requête
Requête
curl -X GET "https://dashboard.scango.ch/api/v1/orders/string" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("https://dashboard.scango.ch/api/v1/orders/string", {
method: "GET",
headers: {
"Autorisation": "Bearer YOUR_TOKEN"
}
});Réponse
{
"data": {
"id": "string",
"orderId": "string",
"orderDate": "2024-01-01T00:00:00Z",
"transactionDate": "2024-01-01T00:00:00Z",
"paymentMethod": "string",
"paymentState": "successful",
"paymentBrand": "string",
"price": 0,
"store": "string",
"transactionMessage": "string",
"giftcardId": "string",
"giftcardFunction": "string",
"deleted": true,
"products": [
{
"productId": "string",
"title": "string",
"price": 0,
"netPrice": 0,
"deposit": 0,
"costPrice": 0,
"quantity": 0,
"weight": 0,
"supplier": "string",
"category": "string",
"tax": 0,
"taxRate": 0,
"type": "string",
"imageUrl": "string",
"originalProductId": "string",
"originalPrice": 0,
"discount": 0,
"undiscountedPrice": 0,
"store": "string",
"printTicket": true
}
],
"flags": "string",
"resolution": "string"
}
}{
"statusCode": 0,
"message": "string",
"timestamp": "2024-01-01T00:00:00Z",
"path": "string"
}{
"statusCode": 0,
"message": "string",
"timestamp": "2024-01-01T00:00:00Z",
"path": "string"
}