Aller au contenu
scango.ch
Français
Esc
naviguerouvrir⌘Japerçu

Obtenir une commande par ID

Récupère une commande par id, y compris les lignes.

GET/orders/{orderId}
Autorisation
AutorisationJeton Bearer (API key) · headerobligatoire
Clé API de l’organisation.
Paramètres de chemin
orderIdstringobligatoire
Réponses
200Détails de la commande
dataOrderobligatoire
Commande. Les dates sont en ISO-8601. Les champs monétaires sont des entiers en centimes.
Afficher les propriétés
idstring
Identifiant
orderIdstring
orderDatestring<date-time>
transactionDatestring<date-time>
paymentMethodstring
paymentStatestring
Autorisé:successfulcancelledtimeoutfailedpending
paymentBrandstring
priceinteger
Total de la commande en centimes
storestring
Id du magasin
transactionMessagestring
giftcardIdstring
giftcardFunctionstring
deletedboolean
productsOrderLine[]
Afficher les propriétés
Array of OrderLine
productIdstring
titlestring
priceinteger
Total de la ligne en centimes.
netPriceinteger
Montant net en centimes.
depositinteger
Consigne en centimes.
costPriceinteger
quantitynumber
weightnumber
supplierstring
categorystring
taxinteger
Montant de taxe en centimes.
taxRatenumber
typestring
p. ex. product, coupon, giftcard.
imageUrlstring
originalProductIdstring
originalPriceinteger
discountnumber
undiscountedPriceinteger
storestring
printTicketboolean
flagsany
Présent lors de l’obtention par id.
resolutionany
Optionnel ; présent lors de l’obtention par id.
403Non autorisé
statusCodeintegerobligatoire
Code de statut HTTP
messagestringobligatoire
Message d’erreur lisible
timestampstring<date-time>obligatoire
pathstringobligatoire
Chemin de la requête
404Not found
statusCodeintegerobligatoire
Code de statut HTTP
messagestringobligatoire
Message d’erreur lisible
timestampstring<date-time>obligatoire
pathstringobligatoire
Chemin de la requête
Requête
curl -X GET "https://dashboard.scango.ch/api/v1/orders/string" \
  -H "Authorization: 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"
  }
}