Documentation

Carte en cours du clonage...

Merci d'attendre la fin du clonage avant de modifier quoi que ce soit.

API ERRORS RESPONSES

API errors responses

Foxorder's API includes an error management system, this system allows users to have assistance in case of error.

Depending on the type of errors, the error message is often explicit (typing, null, format, etc.) otherwise, it indicates the source of the error and possibly the solution.

Logo
Endpoint Method Error code => message
/api/v2/orders
GET
  • 400
    => Bad Request
  • 400
    => Invalid Date
  • 403
    => Not allowed
/api/v2/orders
POST
  • 400
    => Invalid input
    • shop
      • => This field is required.
    • locale
      • => At least one locale is required.
      • => The selected locale (eg. es_ES) is invalid.
      • => Duplicated locale.
    • device
      • => Tokens shop's entity & shop's device do not match.
      • => This mode is not allowed on this device.
    • date
      • => This value should not be null.
      • => ASAP date is incorrect.
      • => Invalid order's date.
      • => Future date is invalid.
      • => Minimum number of days not met.
      • => Exceeds maximum number of days allowed.
      • => The order date minutes must be a multiple of the shop's order interval.
      • => The order date cannot be ASAP.
      • => Shop closed.
      • => Maximum orders for this slot has been reached. Please pick an other slot.
      • => Maximum products used in this slot has been reached. Please pick an other slot.
      • => Ordering hours are incorrect.
      • => Pickup hours are incorrect.
      • => This field is required.
    • tableNumber
      • => Table's number is missing.
    • customerName
      • => Customer's name is missing.
    • qoodosRewards
      • => Invalid free item data (id => %code%, sku => %sku%).
      • => Invalid Qoodos reward.
      • => Invalid Qoodos discount.
    • promotion
      • => Guests are not allowed.
      • => Minimum order amount not reached for promotion.
      • => Promotion code is invalid.
    • createdByGuest
      • => API users can only place guest orders.
      • => This field is required.
    • user
      • => Customer is mandatory.
    • deliveryAddress
      • => Delivery address is out of zones.
      • => Invalid delivery address.
    • managementFees
      • => The management fees are invalid.
      • => This field is required.
    • shippingCost
      • => The shipping cost is invalid.
    • fees
      • => These fees are not applicable to this order.
      • => The fees provided are invalid.
    • total
      • => The total amount is invalid.
      • => The average delivery cost is lower than expected.
      • => This field is required.
    • items_total
      • => The items total is invalid.
    • discount_total
      • => The discount total is invalid.
    • franchise
      • => Unauthorized locale (%code%).
    • orderItems
      • => The total value of the order item is invalid.
      • => This field is required.
      • stepList
        • => Unauthorized locale (%code%).
        • => The format of the step item is invalid.
        • => The specified product could not be found.
        • => These fields (id, name, stepItem, stepTotalPrice) are required
        • stepItem
          • => These fields (id, products, price) are required
          • product
            • => These fields (id, sku, externalId, imageUrl, translations, calory, withAlcool, optionList, serveLater) are required
            • optionList
              • => These fields (id', 'type', 'optionVariant', 'translations', 'sideComponent', 'externalId', 'imageUrl', 'position) are required
      • optionList
        • => The option list contains invalid data.
        • => The maximum number of allowed option variants has been exceeded.
        • => The option is invalid.
        • => The option variants are invalid.
        • => These fields (id', 'type', 'optionVariant', 'translations', 'sideComponent', 'externalId', 'imageUrl', 'position) are required
      • product
        • => This field is required.
      • productShopMode
        • => This field is required.
      • quantity
        • => This field is required.
      • total
        • => This field is required.
      • note
        • => This field is required.
    • itemsTotal
      • => This field is required.
    • discountsTotal
      • => This field is required.
    • shopMode
      • => This field is required.
    • asap
      • => This field is required.
    • setting
      • => Order's setting attribute is invalid.
    • value
      • => Order's setting value attribute is invalid.
    • cutlery
      • => Order's setting cutlery attribute is invalid.
    • customerIdentifier
      • => Order's setting customer identifier attribute does not match with the configured one.
    • discounts
      • => Too many discounts.
    • loyalty
      • => Unauthorized.
      • => Loyalty attribute format is invalid.
      • customer
        • => Loyalty customer attribute is invalid.
        • => Too many rewards provided.
      • rewards
        • => Reward is invalid (id => %code%).
        • => The reward type is invalid.
        • => The reward data is invalid (id => %code%, attribut => %field%).
        • => The attribut Type/Value is invalid (id => %code%, value => %value%).
        • => The reward integrity is invalid.
        • => The reward discount is invalid (id => %code%).
        • => The rewards are missing.
  • 400
    => Invalid input
  • 400
    => Request failed
  • 404
    => Customer not found
  • 422
    => Unprocessable entity
  • 400
    => Invalid device's token
  • 401
    => Unrecognized device
/api/v2/orders/{id}
GET
  • 404
    => Resource not found
  • 400
    => Invalid device's token
  • 401
    => Unrecognized device
/api/v2/orders/{id}
PUT
  • 400
    => Invalid input
    • shop
      • => This field is required.
    • locale
      • => At least one locale is required.
      • => The selected locale (eg. es_ES) is invalid.
      • => Duplicated locale.
    • device
      • => Tokens shop's entity & shop's device do not match.
      • => This mode is not allowed on this device.
    • date
      • => This value should not be null.
      • => ASAP date is incorrect.
      • => Invalid order's date.
      • => Future date is invalid.
      • => Minimum number of days not met.
      • => Exceeds maximum number of days allowed.
      • => The order date minutes must be a multiple of the shop's order interval.
      • => The order date cannot be ASAP.
      • => Shop closed.
      • => Maximum orders for this slot has been reached. Please pick an other slot.
      • => Maximum products used in this slot has been reached. Please pick an other slot.
      • => Ordering hours are incorrect.
      • => Pickup hours are incorrect.
      • => This field is required.
    • tableNumber
      • => Table's number is missing.
    • customerName
      • => Customer's name is missing.
    • qoodosRewards
      • => Invalid free item data (id => %code%, sku => %sku%).
      • => Invalid Qoodos reward.
      • => Invalid Qoodos discount.
    • promotion
      • => Guests are not allowed.
      • => Minimum order amount not reached for promotion.
      • => Promotion code is invalid.
    • createdByGuest
      • => API users can only place guest orders.
      • => This field is required.
    • user
      • => Customer is mandatory.
    • deliveryAddress
      • => Delivery address is out of zones.
      • => Invalid delivery address.
    • managementFees
      • => The management fees are invalid.
      • => This field is required.
    • shippingCost
      • => The shipping cost is invalid.
    • fees
      • => These fees are not applicable to this order.
      • => The fees provided are invalid.
    • total
      • => The total amount is invalid.
      • => The average delivery cost is lower than expected.
      • => This field is required.
    • items_total
      • => The items total is invalid.
    • discount_total
      • => The discount total is invalid.
    • franchise
      • => Unauthorized locale (%code%).
    • orderItems
      • => The total value of the order item is invalid.
      • => This field is required.
      • stepList
        • => Unauthorized locale (%code%).
        • => The format of the step item is invalid.
        • => The specified product could not be found.
        • => These fields (id, name, stepItem, stepTotalPrice) are required
        • stepItem
          • => These fields (id, products, price) are required
          • product
            • => These fields (id, sku, externalId, imageUrl, translations, calory, withAlcool, optionList, serveLater) are required
            • optionList
              • => These fields (id', 'type', 'optionVariant', 'translations', 'sideComponent', 'externalId', 'imageUrl', 'position) are required
      • optionList
        • => The option list contains invalid data.
        • => The maximum number of allowed option variants has been exceeded.
        • => The option is invalid.
        • => The option variants are invalid.
        • => These fields (id', 'type', 'optionVariant', 'translations', 'sideComponent', 'externalId', 'imageUrl', 'position) are required
      • product
        • => This field is required.
      • productShopMode
        • => This field is required.
      • quantity
        • => This field is required.
      • total
        • => This field is required.
      • note
        • => This field is required.
    • itemsTotal
      • => This field is required.
    • discountsTotal
      • => This field is required.
    • shopMode
      • => This field is required.
    • asap
      • => This field is required.
    • setting
      • => Order's setting attribute is invalid.
    • value
      • => Order's setting value attribute is invalid.
    • cutlery
      • => Order's setting cutlery attribute is invalid.
    • customerIdentifier
      • => Order's setting customer identifier attribute does not match with the configured one.
    • discounts
      • => Too many discounts.
    • loyalty
      • => Unauthorized.
      • => Loyalty attribute format is invalid.
      • customer
        • => Loyalty customer attribute is invalid.
        • => Too many rewards provided.
      • rewards
        • => Reward is invalid (id => %code%).
        • => The reward type is invalid.
        • => The reward data is invalid (id => %code%, attribut => %field%).
        • => The attribut Type/Value is invalid (id => %code%, value => %value%).
        • => The reward integrity is invalid.
        • => The reward discount is invalid (id => %code%).
        • => The rewards are missing.
    • payment
      • => Order has some pending payments.
      • => This order cannot be modified.
  • 400
    => Invalid input
  • 404
    => Resource not found
  • 400
    => Request failed
  • 404
    => Customer not found
  • 422
    => Unprocessable entity
  • 400
    => Invalid device's token
  • 401
    => Unrecognized device
/api/v2/orders/{id}/accept
PATCH
  • 400
    => Invalid input
  • 403
    => Not allowed
  • 404
    => Resource not found
  • 422
    => Unprocessable entity
/api/v2/orders/{id}/cancel
PATCH
  • 400
    => Invalid input
  • 403
    => Not allowed
  • 404
    => Resource not found
  • 422
    => Unprocessable entity
  • 404
    => Customer not found
/api/v2/orders/{id}/delay
PATCH
  • 400
    => Invalid input
  • 403
    => Not allowed
  • 404
    => Resource not found
  • 422
    => Unprocessable entity
  • 404
    => Customer not found
  • 400
    => Missing or invalid parameters
/api/v2/orders/{id}/deliver
PATCH
  • 400
    => Invalid input
  • 403
    => Not allowed
  • 404
    => Resource not found
  • 422
    => Unprocessable entity
/api/v2/orders/{id}/pay
PATCH
  • 400
    => Invalid input
  • 403
    => Not allowed
  • 404
    => Resource not found
  • 422
    => Unprocessable entity
/api/v2/orders/{id}/ready
PATCH
  • 400
    => Invalid input
  • 403
    => Not allowed
  • 404
    => Resource not found
  • 422
    => Unprocessable entity
  • 404
    => Customer not found
/api/v2/orders/{id}/reject
PATCH
  • 400
    => Invalid input
  • 403
    => Not allowed
  • 404
    => Resource not found
  • 422
    => Unprocessable entity
  • 404
    => Customer not found
/api/v2/orders/cancel-payments
POST
  • 400
    => Invalid input
    • order
      • => The order payments cannot be cancelled
      • => Order not found
Loading…
Loading the web debug toolbar…
Attempt #