Sucrine Backend

v1.173.5
Base URLs
https://app.sucrine.club/apiServeur principal de production
https://preview.app.sucrine.club/apiServeur de test (données répliquées depuis la production à J-1)

API privée Sucrine Backend

Authentication

APIKeyapiKey

Exemple : Authorization: ApiKey ABCDEFGHI

API Key: API Key in header

Contacts

GET
https://app.sucrine.club/api/professional/contacts

Lister les contacts

Parameters

pageintegerquery

Page à récupérer

limitintegerquery

Elements par page

Response

200OKobject

Successful response

Authorization

APIKeyapiKey in header

Exemple : Authorization: ApiKey ABCDEFGHI

GET /professional/contacts
curl -X GET 'https://app.sucrine.club/api/professional/contacts'
const response = await fetch('https://app.sucrine.club/api/professional/contacts', {
  method: 'GET',
});

const data = await response.json();
import requests

response = requests.get('https://app.sucrine.club/api/professional/contacts')
data = response.json()
200
{
  "paging": {
    "total": 0,
    "currentPage": 0,
    "pageCount": 0,
    "itemsPerPage": 0
  },
  "items": [
    {
      "_id": "string",
      "name": "string",
      "email": "string",
      "phone": "string",
      "phoneStatus": "string",
      "status": "string",
      "company": "string",
      "groups": [
        "string"
      ]
    }
  ]
}

Orders

GET
https://app.sucrine.club/api/professional/orders

Lister les commandes

Response

200OKany

Successful response

Authorization

APIKeyapiKey in header

Exemple : Authorization: ApiKey ABCDEFGHI

GET /professional/orders
curl -X GET 'https://app.sucrine.club/api/professional/orders'
const response = await fetch('https://app.sucrine.club/api/professional/orders', {
  method: 'GET',
});

const data = await response.json();
import requests

response = requests.get('https://app.sucrine.club/api/professional/orders')
data = response.json()
GET
https://app.sucrine.club/api/professional/orders/{orderId}

Voir une commande

Parameters

orderIdstringrequiredpath

Identifiant de la commande

Response

200OKany

Successful response

Authorization

APIKeyapiKey in header

Exemple : Authorization: ApiKey ABCDEFGHI

GET /professional/orders/{orderId}
curl -X GET 'https://app.sucrine.club/api/professional/orders/{orderId}'
const response = await fetch('https://app.sucrine.club/api/professional/orders/{orderId}', {
  method: 'GET',
});

const data = await response.json();
import requests

response = requests.get('https://app.sucrine.club/api/professional/orders/{orderId}')
data = response.json()
POST
https://app.sucrine.club/api/professional/customerOrders/order

Créer une commande

Body

application/json
orderTypestringorderreturn
customerOrderReferencestring | null

Référence de commande externe

orderSourcestring | null

Source de commande

advancedCatalogueItemsobject

Liste des produits commandés

Show child attributes
{catalogueItemPriceId}object
Show child attributes
quantitynumber<float>

Quantité

ePriceobject

Montant

Show child attributes
amountnumber<float>required
amountTypestringunitPricedfPricepkgPricedfPkgPricerequired
messagestring

Commentaire associé à la ligne

adjustedUnitsPerLotArray<number>

Ajustement de poids

preparationOptionsArray<object>

Options de préparation

Show child attributes
expirationDatestring<date-time>
batchNumberstring
stockstring
quantitynumber<float>
optionsobject

Options de commande

Show child attributes
sameOptionsAppliedbooleanrequired
commonobject
itemsArray<object>
skipPreciseSupplyCheckboolean

Ignorer l'état des stocks

deliveryPointstringrequired

Mode de distribution

deliveryobject

Livraison

Show child attributes
descriptionstring

Nom de la livraison

amountnumber<float>

Montant TTC

dfAmountnumber<float>

Montant HT

vatRatenumber<float>

Taux de TVA (en %)

vatAmountnumber<float>

Montant de TVA

discountsArray<object>

Remises

Show child attributes
rawValuenumber<float>

Valeur brute de la remise

typestringamountdfAmountpercent

Type de remise

vatRatenumber<float>

Taux de TVA (en %)

commentstring

Commentaire

dfAmountnumber<float>

Montant HT de la remise

vatAmountnumber<float>

Montant de la TVA de la remise

amountnumber<float>

Montant TTC de la remise

deliveryAddressobject | object

Adresse de livraison

invoicingAddressobject | object

Adresse de facturation

messagestring

Message associé à la commande

saleIdstring | null

Identifiant de vente ponctuelle

orderedBystring

Identifiant du contact de commande

newContactobject

Création d'un nouveau contact lors de la commande, si pas de orderedBy défini

Show child attributes
namestringrequired
emailstring | string
phonestring
customTimeSlotboolean

Utiliser une date de distribution personnalisée

timeSlotstring<date-time>

Date de début de distribution

timeSlotEndstring<date-time>

Date de fin de distribution

Response

200OKobject

Successful response

Authorization

APIKeyapiKey in header

Exemple : Authorization: ApiKey ABCDEFGHI

POST /professional/customerOrders/order
curl -X POST 'https://app.sucrine.club/api/professional/customerOrders/order' \
  -H 'Content-Type: application/json' \
  -d '{
    "orderType": "order",
    "customerOrderReference": "string",
    "orderSource": "string",
    "advancedCatalogueItems": {
      "{catalogueItemPriceId}": {
        "quantity": 0,
        "ePrice": {
          "amount": 0,
          "amountType": "unitPrice"
        },
        "message": "string",
        "adjustedUnitsPerLot": [
          0
        ],
        "preparationOptions": [
          {
            "expirationDate": "2024-01-15T09:30:00Z",
            "batchNumber": "string",
            "stock": "string",
            "quantity": 0
          }
        ],
        "options": {
          "sameOptionsApplied": true,
          "common": {},
          "items": [
            {}
          ]
        }
      }
    },
    "skipPreciseSupplyCheck": true,
    "deliveryPoint": "string",
    "delivery": {
      "description": "string",
      "amount": 0,
      "dfAmount": 0,
      "vatRate": 0,
      "vatAmount": 0
    },
    "discounts": [
      {
        "rawValue": 0,
        "type": "amount",
        "vatRate": 0,
        "comment": "string",
        "dfAmount": 0,
        "vatAmount": 0,
        "amount": 0
      }
    ],
    "deliveryAddress": {
      "address": "string",
      "addressExtra": "string",
      "city": "string",
      "company": "string",
      "name": "string",
      "country": "FR",
      "zipcode": "string"
    },
    "invoicingAddress": {
      "address": "string",
      "addressExtra": "string",
      "city": "string",
      "company": "string",
      "name": "string",
      "country": "FR",
      "zipcode": "string"
    },
    "message": "string",
    "saleId": "string",
    "orderedBy": "string",
    "newContact": {
      "name": "string",
      "email": "user@example.com",
      "phone": "string"
    },
    "customTimeSlot": true,
    "timeSlot": "2024-01-15T09:30:00Z",
    "timeSlotEnd": "2024-01-15T09:30:00Z"
  }'
const response = await fetch('https://app.sucrine.club/api/professional/customerOrders/order', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "orderType": "order",
      "customerOrderReference": "string",
      "orderSource": "string",
      "advancedCatalogueItems": {
        "{catalogueItemPriceId}": {
          "quantity": 0,
          "ePrice": {
            "amount": 0,
            "amountType": "unitPrice"
          },
          "message": "string",
          "adjustedUnitsPerLot": [
            0
          ],
          "preparationOptions": [
            {
              "expirationDate": "2024-01-15T09:30:00Z",
              "batchNumber": "string",
              "stock": "string",
              "quantity": 0
            }
          ],
          "options": {
            "sameOptionsApplied": true,
            "common": {},
            "items": [
              {}
            ]
          }
        }
      },
      "skipPreciseSupplyCheck": true,
      "deliveryPoint": "string",
      "delivery": {
        "description": "string",
        "amount": 0,
        "dfAmount": 0,
        "vatRate": 0,
        "vatAmount": 0
      },
      "discounts": [
        {
          "rawValue": 0,
          "type": "amount",
          "vatRate": 0,
          "comment": "string",
          "dfAmount": 0,
          "vatAmount": 0,
          "amount": 0
        }
      ],
      "deliveryAddress": {
        "address": "string",
        "addressExtra": "string",
        "city": "string",
        "company": "string",
        "name": "string",
        "country": "FR",
        "zipcode": "string"
      },
      "invoicingAddress": {
        "address": "string",
        "addressExtra": "string",
        "city": "string",
        "company": "string",
        "name": "string",
        "country": "FR",
        "zipcode": "string"
      },
      "message": "string",
      "saleId": "string",
      "orderedBy": "string",
      "newContact": {
        "name": "string",
        "email": "user@example.com",
        "phone": "string"
      },
      "customTimeSlot": true,
      "timeSlot": "2024-01-15T09:30:00Z",
      "timeSlotEnd": "2024-01-15T09:30:00Z"
    }),
});

const data = await response.json();
import requests

payload = {
  "orderType": "order",
  "customerOrderReference": "string",
  "orderSource": "string",
  "advancedCatalogueItems": {
    "{catalogueItemPriceId}": {
      "quantity": 0,
      "ePrice": {
        "amount": 0,
        "amountType": "unitPrice"
      },
      "message": "string",
      "adjustedUnitsPerLot": [
        0
      ],
      "preparationOptions": [
        {
          "expirationDate": "2024-01-15T09:30:00Z",
          "batchNumber": "string",
          "stock": "string",
          "quantity": 0
        }
      ],
      "options": {
        "sameOptionsApplied": True,
        "common": {},
        "items": [
          {}
        ]
      }
    }
  },
  "skipPreciseSupplyCheck": True,
  "deliveryPoint": "string",
  "delivery": {
    "description": "string",
    "amount": 0,
    "dfAmount": 0,
    "vatRate": 0,
    "vatAmount": 0
  },
  "discounts": [
    {
      "rawValue": 0,
      "type": "amount",
      "vatRate": 0,
      "comment": "string",
      "dfAmount": 0,
      "vatAmount": 0,
      "amount": 0
    }
  ],
  "deliveryAddress": {
    "address": "string",
    "addressExtra": "string",
    "city": "string",
    "company": "string",
    "name": "string",
    "country": "FR",
    "zipcode": "string"
  },
  "invoicingAddress": {
    "address": "string",
    "addressExtra": "string",
    "city": "string",
    "company": "string",
    "name": "string",
    "country": "FR",
    "zipcode": "string"
  },
  "message": "string",
  "saleId": "string",
  "orderedBy": "string",
  "newContact": {
    "name": "string",
    "email": "user@example.com",
    "phone": "string"
  },
  "customTimeSlot": True,
  "timeSlot": "2024-01-15T09:30:00Z",
  "timeSlotEnd": "2024-01-15T09:30:00Z"
}

response = requests.post('https://app.sucrine.club/api/professional/customerOrders/order', json=payload)
data = response.json()
Request Body
{
  "orderType": "order",
  "customerOrderReference": "string",
  "orderSource": "string",
  "advancedCatalogueItems": {
    "{catalogueItemPriceId}": {
      "quantity": 0,
      "ePrice": {
        "amount": 0,
        "amountType": "unitPrice"
      },
      "message": "string",
      "adjustedUnitsPerLot": [
        0
      ],
      "preparationOptions": [
        {
          "expirationDate": "2024-01-15T09:30:00Z",
          "batchNumber": "string",
          "stock": "string",
          "quantity": 0
        }
      ],
      "options": {
        "sameOptionsApplied": true,
        "common": {},
        "items": [
          {}
        ]
      }
    }
  },
  "skipPreciseSupplyCheck": true,
  "deliveryPoint": "string",
  "delivery": {
    "description": "string",
    "amount": 0,
    "dfAmount": 0,
    "vatRate": 0,
    "vatAmount": 0
  },
  "discounts": [
    {
      "rawValue": 0,
      "type": "amount",
      "vatRate": 0,
      "comment": "string",
      "dfAmount": 0,
      "vatAmount": 0,
      "amount": 0
    }
  ],
  "deliveryAddress": {
    "address": "string",
    "addressExtra": "string",
    "city": "string",
    "company": "string",
    "name": "string",
    "country": "FR",
    "zipcode": "string"
  },
  "invoicingAddress": {
    "address": "string",
    "addressExtra": "string",
    "city": "string",
    "company": "string",
    "name": "string",
    "country": "FR",
    "zipcode": "string"
  },
  "message": "string",
  "saleId": "string",
  "orderedBy": "string",
  "newContact": {
    "name": "string",
    "email": "user@example.com",
    "phone": "string"
  },
  "customTimeSlot": true,
  "timeSlot": "2024-01-15T09:30:00Z",
  "timeSlotEnd": "2024-01-15T09:30:00Z"
}
200
{
  "internalId": "string",
  "orderId": "string",
  "status": true,
  "sentMessages": [
    {
      "type": "email",
      "dest": "string"
    }
  ]
}
POST
https://app.sucrine.club/api/professional/orders/{orderId}/validate

Valider une commande

Parameters

orderIdstringrequiredpath

Identifiant de la commande

Response

200OKobject

Successful response

Authorization

APIKeyapiKey in header

Exemple : Authorization: ApiKey ABCDEFGHI

POST /professional/orders/{orderId}/validate
curl -X POST 'https://app.sucrine.club/api/professional/orders/{orderId}/validate'
const response = await fetch('https://app.sucrine.club/api/professional/orders/{orderId}/validate', {
  method: 'POST',
});

const data = await response.json();
import requests

response = requests.post('https://app.sucrine.club/api/professional/orders/{orderId}/validate')
data = response.json()
200
{
  "status": true
}
POST
https://app.sucrine.club/api/professional/orders/{orderId}/endPreparation

Marquer une commande comme préparée

Parameters

orderIdstringrequiredpath

Identifiant de la commande

Response

200OKobject

Successful response

Authorization

APIKeyapiKey in header

Exemple : Authorization: ApiKey ABCDEFGHI

POST /professional/orders/{orderId}/endPreparation
curl -X POST 'https://app.sucrine.club/api/professional/orders/{orderId}/endPreparation'
const response = await fetch('https://app.sucrine.club/api/professional/orders/{orderId}/endPreparation', {
  method: 'POST',
});

const data = await response.json();
import requests

response = requests.post('https://app.sucrine.club/api/professional/orders/{orderId}/endPreparation')
data = response.json()
200
{
  "status": true
}
POST
https://app.sucrine.club/api/professional/orders/{orderId}/cancel

Annuler une commande

Parameters

orderIdstringrequiredpath

Identifiant de la commande

Response

200OKobject

Successful response

Authorization

APIKeyapiKey in header

Exemple : Authorization: ApiKey ABCDEFGHI

POST /professional/orders/{orderId}/cancel
curl -X POST 'https://app.sucrine.club/api/professional/orders/{orderId}/cancel'
const response = await fetch('https://app.sucrine.club/api/professional/orders/{orderId}/cancel', {
  method: 'POST',
});

const data = await response.json();
import requests

response = requests.post('https://app.sucrine.club/api/professional/orders/{orderId}/cancel')
data = response.json()
200
{
  "status": true
}

DeliveryPoints

GET
https://app.sucrine.club/api/professional/catalogues/{catalogueId}/deliveryPoints

Lister les mode de distribution

Parameters

catalogueIdstringrequiredpath

Identifiant du catalogue

Response

200OKArray<object>

Successful response

Authorization

APIKeyapiKey in header

Exemple : Authorization: ApiKey ABCDEFGHI

GET /professional/catalogues/{catalogueId}/deliveryPoints
curl -X GET 'https://app.sucrine.club/api/professional/catalogues/{catalogueId}/deliveryPoints'
const response = await fetch('https://app.sucrine.club/api/professional/catalogues/{catalogueId}/deliveryPoints', {
  method: 'GET',
});

const data = await response.json();
import requests

response = requests.get('https://app.sucrine.club/api/professional/catalogues/{catalogueId}/deliveryPoints')
data = response.json()
200
[
  {
    "_id": "string",
    "collectInstructions": "string",
    "state": "available",
    "timeSlots": [
      {
        "dayOfWeek": "string",
        "timeSlotMode": "string",
        "fromTime": 0,
        "toTime": 0,
        "dayBeforeOrder": 0,
        "maxTime": 0
      }
    ],
    "type": "string",
    "groups": [
      "string"
    ],
    "privateName": "string",
    "saleSite": {},
    "pickupAddress": {}
  }
]