{
  "openapi": "3.0.0",
  "servers": [
    {
      "url": "https://api.sinqro.com/market-app/v1"
    }
  ],
  "info": {
    "description": "Sinqro API reference (scope: market_app_api). [Register your app](https://www.sinqro.com) to get your `x-api-server-access-token`. Most of services require a `x-api-user-access-token` and must be obtained authenticating the user by login\n\nIntegration case: https://www.sinqro.com/docs/channel_market_app",
    "version": "2.0",
    "title": "Market App API",
    "termsOfService": "http://www.sinqro.com/terms/",
    "contact": {
      "email": "developer@sinqro.com"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
    }
  },
  "tags": [
    {
      "name": "Client",
      "description": "All services you need to build a client app"
    },
    {
      "name": "Consumer",
      "description": "All services you need to build a consumer app"
    },
    {
      "name": "Order",
      "description": "Order services"
    },
    {
      "name": "Address and places",
      "description": "Address & places services"
    },
    {
      "name": "Credit cards",
      "description": "Credit cards"
    },
    {
      "name": "Coupons",
      "description": "Coupons actions"
    },
    {
      "name": "SellingPoint",
      "description": "Menus and selling point availability"
    }
  ],
  "paths": {
    "/consumers/login": {
      "post": {
        "summary": "Consumer login",
        "description": "",
        "operationId": "consumerLogin",
        "responses": {
          "200": {
            "description": "successful operation",
            "headers": {
              "x-api-user-access-token": {
                "description": "User access token",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "title": "Consumer",
                  "description": "",
                  "type": "object",
                  "required": [
                    "id",
                    "name",
                    "email"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer",
                      "format": "int64",
                      "example": "1003",
                      "description": "Consumer identifier"
                    },
                    "email": {
                      "type": "string",
                      "example": "john@example.com",
                      "description": "Consumer email"
                    },
                    "name": {
                      "type": "string",
                      "example": "John",
                      "description": "Consumer name"
                    },
                    "lastname": {
                      "type": "string",
                      "example": "Doe",
                      "description": "Consumer last name"
                    },
                    "image": {
                      "type": "string",
                      "example": "https://cdn.sinqro.com/assets/images/placeholder_image.jpg",
                      "description": "Consumer profile image url"
                    },
                    "phone": {
                      "type": "string",
                      "example": "+34600000000",
                      "description": "In international format. Ex. +34600000000"
                    },
                    "account": {
                      "title": "Account",
                      "description": "Consumer account",
                      "type": "object",
                      "required": [
                        "id",
                        "name"
                      ],
                      "properties": {
                        "id": {
                          "type": "integer",
                          "format": "int32",
                          "example": "43",
                          "description": "Account identifier"
                        },
                        "name": {
                          "type": "string",
                          "example": "My account",
                          "description": "Account name"
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": {
                      "id": "1003",
                      "email": "john@example.com",
                      "name": "John",
                      "lastname": "Doe",
                      "image": "https://cdn.sinqro.com/assets/images/placeholder_image.jpg",
                      "phone": "+34600000000",
                      "account": {
                        "id": "43",
                        "name": "My account"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Consumer"
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "description": "The consumer email for login",
                    "type": "string"
                  },
                  "password": {
                    "description": "The password for login in clear text",
                    "type": "string"
                  },
                  "platformId": {
                    "description": "Consumer platform identifier",
                    "type": "integer",
                    "format": "int64"
                  }
                },
                "required": [
                  "email",
                  "password",
                  "platformId"
                ]
              }
            }
          }
        }
      }
    },
    "/consumers": {
      "post": {
        "summary": "Create new consumer",
        "description": "",
        "operationId": "postConsumer",
        "responses": {
          "200": {
            "description": "successful operation",
            "headers": {
              "x-api-user-access-token": {
                "description": "User access token",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "title": "Consumer",
                  "description": "",
                  "type": "object",
                  "required": [
                    "id",
                    "name",
                    "email"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer",
                      "format": "int64",
                      "example": "1003",
                      "description": "Consumer identifier"
                    },
                    "email": {
                      "type": "string",
                      "example": "john@example.com",
                      "description": "Consumer email"
                    },
                    "name": {
                      "type": "string",
                      "example": "John",
                      "description": "Consumer name"
                    },
                    "lastname": {
                      "type": "string",
                      "example": "Doe",
                      "description": "Consumer last name"
                    },
                    "image": {
                      "type": "string",
                      "example": "https://cdn.sinqro.com/assets/images/placeholder_image.jpg",
                      "description": "Consumer profile image url"
                    },
                    "phone": {
                      "type": "string",
                      "example": "+34600000000",
                      "description": "In international format. Ex. +34600000000"
                    },
                    "account": {
                      "title": "Account",
                      "description": "Consumer account",
                      "type": "object",
                      "required": [
                        "id",
                        "name"
                      ],
                      "properties": {
                        "id": {
                          "type": "integer",
                          "format": "int32",
                          "example": "43",
                          "description": "Account identifier"
                        },
                        "name": {
                          "type": "string",
                          "example": "My account",
                          "description": "Account name"
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": {
                      "id": "1003",
                      "email": "john@example.com",
                      "name": "John",
                      "lastname": "Doe",
                      "image": "https://cdn.sinqro.com/assets/images/placeholder_image.jpg",
                      "phone": "+34600000000",
                      "account": {
                        "id": "43",
                        "name": "My account"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Consumer"
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "description": "Consumer name",
                    "type": "string"
                  },
                  "lastname": {
                    "description": "Consumer last name",
                    "type": "string"
                  },
                  "phone": {
                    "description": "Consumer phone number",
                    "type": "string"
                  },
                  "email": {
                    "description": "Consumer email",
                    "type": "string"
                  },
                  "password": {
                    "description": "Consumer access password",
                    "type": "string"
                  },
                  "platformId": {
                    "description": "Consumer platform identifier",
                    "type": "integer",
                    "format": "int64"
                  },
                  "countryIsoCode": {
                    "description": "Consumer country ISO code",
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "lastname",
                  "phone",
                  "email",
                  "platformId",
                  "countryIsoCode"
                ]
              }
            }
          }
        }
      }
    },
    "/consumers/recoveryPassword": {
      "post": {
        "summary": "Request recovery password",
        "description": "Request a recovery password code. This code only can be used one time.",
        "operationId": "consumerRecoveryPassword",
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean",
                  "example": "true"
                },
                "examples": {
                  "response": {
                    "value": []
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Consumer"
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "description": "The consumer email used in login",
                    "type": "string"
                  },
                  "platformId": {
                    "description": "Consumer platform identifier",
                    "type": "integer",
                    "format": "int64"
                  }
                },
                "required": [
                  "email",
                  "platformId"
                ]
              }
            }
          }
        }
      }
    },
    "/consumers/checkRecoveryCode": {
      "post": {
        "summary": "Check consumer recovery code",
        "description": "Check consumer recovery code using consumer email and received recovery code. If the code matches method returns valid x-api-user-access-token allowed to use in post consumer password action and set a new password. Once you get a successful response with consumer code this code will be disabled",
        "operationId": "consumerCheckRecoveryCode",
        "responses": {
          "200": {
            "description": "successful operation",
            "headers": {
              "x-api-user-access-token": {
                "description": "User access token",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "title": "Consumer",
                  "description": "",
                  "type": "object",
                  "required": [
                    "id",
                    "name",
                    "email"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer",
                      "format": "int64",
                      "example": "1003",
                      "description": "Consumer identifier"
                    },
                    "email": {
                      "type": "string",
                      "example": "john@example.com",
                      "description": "Consumer email"
                    },
                    "name": {
                      "type": "string",
                      "example": "John",
                      "description": "Consumer name"
                    },
                    "lastname": {
                      "type": "string",
                      "example": "Doe",
                      "description": "Consumer last name"
                    },
                    "image": {
                      "type": "string",
                      "example": "https://cdn.sinqro.com/assets/images/placeholder_image.jpg",
                      "description": "Consumer profile image url"
                    },
                    "phone": {
                      "type": "string",
                      "example": "+34600000000",
                      "description": "In international format. Ex. +34600000000"
                    },
                    "account": {
                      "title": "Account",
                      "description": "Consumer account",
                      "type": "object",
                      "required": [
                        "id",
                        "name"
                      ],
                      "properties": {
                        "id": {
                          "type": "integer",
                          "format": "int32",
                          "example": "43",
                          "description": "Account identifier"
                        },
                        "name": {
                          "type": "string",
                          "example": "My account",
                          "description": "Account name"
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": {
                      "id": "1003",
                      "email": "john@example.com",
                      "name": "John",
                      "lastname": "Doe",
                      "image": "https://cdn.sinqro.com/assets/images/placeholder_image.jpg",
                      "phone": "+34600000000",
                      "account": {
                        "id": "43",
                        "name": "My account"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Consumer"
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "description": "The consumer email used in login",
                    "type": "string"
                  },
                  "recoveryCode": {
                    "description": "The recovery code provided with /consumers/recoveryPassword request",
                    "type": "string"
                  },
                  "platformId": {
                    "description": "Consumer platform identifier",
                    "type": "integer",
                    "format": "int64"
                  }
                },
                "required": [
                  "email",
                  "recoveryCode",
                  "platformId"
                ]
              }
            }
          }
        }
      }
    },
    "/consumers/{consumerId}/password": {
      "post": {
        "summary": "Post consumer password",
        "description": "Change current consumer password using only x-api-user-access-token",
        "operationId": "consumerPostPassword",
        "parameters": [
          {
            "name": "consumerId",
            "in": "path",
            "description": "Consumer identifier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "headers": {
              "x-api-user-access-token": {
                "description": "User access token",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "title": "Consumer",
                  "description": "",
                  "type": "object",
                  "required": [
                    "id",
                    "name",
                    "email"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer",
                      "format": "int64",
                      "example": "1003",
                      "description": "Consumer identifier"
                    },
                    "email": {
                      "type": "string",
                      "example": "john@example.com",
                      "description": "Consumer email"
                    },
                    "name": {
                      "type": "string",
                      "example": "John",
                      "description": "Consumer name"
                    },
                    "lastname": {
                      "type": "string",
                      "example": "Doe",
                      "description": "Consumer last name"
                    },
                    "image": {
                      "type": "string",
                      "example": "https://cdn.sinqro.com/assets/images/placeholder_image.jpg",
                      "description": "Consumer profile image url"
                    },
                    "phone": {
                      "type": "string",
                      "example": "+34600000000",
                      "description": "In international format. Ex. +34600000000"
                    },
                    "account": {
                      "title": "Account",
                      "description": "Consumer account",
                      "type": "object",
                      "required": [
                        "id",
                        "name"
                      ],
                      "properties": {
                        "id": {
                          "type": "integer",
                          "format": "int32",
                          "example": "43",
                          "description": "Account identifier"
                        },
                        "name": {
                          "type": "string",
                          "example": "My account",
                          "description": "Account name"
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": {
                      "id": "1003",
                      "email": "john@example.com",
                      "name": "John",
                      "lastname": "Doe",
                      "image": "https://cdn.sinqro.com/assets/images/placeholder_image.jpg",
                      "phone": "+34600000000",
                      "account": {
                        "id": "43",
                        "name": "My account"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Consumer"
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "password": {
                    "description": "New consumer password. Minimum length: 6, and maximum length: 24",
                    "type": "string"
                  }
                },
                "required": [
                  "password"
                ]
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Patch consumer password",
        "description": "Change consumer password using his current password",
        "operationId": "consumerPatchPassword",
        "parameters": [
          {
            "name": "consumerId",
            "in": "path",
            "description": "Consumer identifier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "headers": {
              "x-api-user-access-token": {
                "description": "User access token",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "title": "Consumer",
                  "description": "",
                  "type": "object",
                  "required": [
                    "id",
                    "name",
                    "email"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer",
                      "format": "int64",
                      "example": "1003",
                      "description": "Consumer identifier"
                    },
                    "email": {
                      "type": "string",
                      "example": "john@example.com",
                      "description": "Consumer email"
                    },
                    "name": {
                      "type": "string",
                      "example": "John",
                      "description": "Consumer name"
                    },
                    "lastname": {
                      "type": "string",
                      "example": "Doe",
                      "description": "Consumer last name"
                    },
                    "image": {
                      "type": "string",
                      "example": "https://cdn.sinqro.com/assets/images/placeholder_image.jpg",
                      "description": "Consumer profile image url"
                    },
                    "phone": {
                      "type": "string",
                      "example": "+34600000000",
                      "description": "In international format. Ex. +34600000000"
                    },
                    "account": {
                      "title": "Account",
                      "description": "Consumer account",
                      "type": "object",
                      "required": [
                        "id",
                        "name"
                      ],
                      "properties": {
                        "id": {
                          "type": "integer",
                          "format": "int32",
                          "example": "43",
                          "description": "Account identifier"
                        },
                        "name": {
                          "type": "string",
                          "example": "My account",
                          "description": "Account name"
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": {
                      "id": "1003",
                      "email": "john@example.com",
                      "name": "John",
                      "lastname": "Doe",
                      "image": "https://cdn.sinqro.com/assets/images/placeholder_image.jpg",
                      "phone": "+34600000000",
                      "account": {
                        "id": "43",
                        "name": "My account"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Consumer"
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "oldPassword": {
                    "description": "Old consumer password",
                    "type": "string"
                  },
                  "newPassword": {
                    "description": "New consumer password. Minimum length: 6, and maximum length: 24",
                    "type": "string"
                  }
                },
                "required": [
                  "oldPassword",
                  "newPassword"
                ]
              }
            }
          }
        }
      }
    },
    "/consumers/{consumerId}": {
      "get": {
        "summary": "Get consumer",
        "description": "Get consumer",
        "operationId": "getConsumer",
        "parameters": [
          {
            "name": "consumerId",
            "in": "path",
            "description": "Consumer identifier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Consumer",
                  "description": "",
                  "type": "object",
                  "required": [
                    "id",
                    "name",
                    "email"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer",
                      "format": "int64",
                      "example": "1003",
                      "description": "Consumer identifier"
                    },
                    "email": {
                      "type": "string",
                      "example": "john@example.com",
                      "description": "Consumer email"
                    },
                    "name": {
                      "type": "string",
                      "example": "John",
                      "description": "Consumer name"
                    },
                    "lastname": {
                      "type": "string",
                      "example": "Doe",
                      "description": "Consumer last name"
                    },
                    "image": {
                      "type": "string",
                      "example": "https://cdn.sinqro.com/assets/images/placeholder_image.jpg",
                      "description": "Consumer profile image url"
                    },
                    "phone": {
                      "type": "string",
                      "example": "+34600000000",
                      "description": "In international format. Ex. +34600000000"
                    },
                    "account": {
                      "title": "Account",
                      "description": "Consumer account",
                      "type": "object",
                      "required": [
                        "id",
                        "name"
                      ],
                      "properties": {
                        "id": {
                          "type": "integer",
                          "format": "int32",
                          "example": "43",
                          "description": "Account identifier"
                        },
                        "name": {
                          "type": "string",
                          "example": "My account",
                          "description": "Account name"
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": {
                      "id": "1003",
                      "email": "john@example.com",
                      "name": "John",
                      "lastname": "Doe",
                      "image": "https://cdn.sinqro.com/assets/images/placeholder_image.jpg",
                      "phone": "+34600000000",
                      "account": {
                        "id": "43",
                        "name": "My account"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Consumer"
        ]
      },
      "patch": {
        "summary": "Patch consumer data",
        "description": "Modify consumer data",
        "operationId": "patchConsumer",
        "parameters": [
          {
            "name": "consumerId",
            "in": "path",
            "description": "Consumer identifier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Consumer",
                  "description": "",
                  "type": "object",
                  "required": [
                    "id",
                    "name",
                    "email"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer",
                      "format": "int64",
                      "example": "1003",
                      "description": "Consumer identifier"
                    },
                    "email": {
                      "type": "string",
                      "example": "john@example.com",
                      "description": "Consumer email"
                    },
                    "name": {
                      "type": "string",
                      "example": "John",
                      "description": "Consumer name"
                    },
                    "lastname": {
                      "type": "string",
                      "example": "Doe",
                      "description": "Consumer last name"
                    },
                    "image": {
                      "type": "string",
                      "example": "https://cdn.sinqro.com/assets/images/placeholder_image.jpg",
                      "description": "Consumer profile image url"
                    },
                    "phone": {
                      "type": "string",
                      "example": "+34600000000",
                      "description": "In international format. Ex. +34600000000"
                    },
                    "account": {
                      "title": "Account",
                      "description": "Consumer account",
                      "type": "object",
                      "required": [
                        "id",
                        "name"
                      ],
                      "properties": {
                        "id": {
                          "type": "integer",
                          "format": "int32",
                          "example": "43",
                          "description": "Account identifier"
                        },
                        "name": {
                          "type": "string",
                          "example": "My account",
                          "description": "Account name"
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": {
                      "id": "1003",
                      "email": "john@example.com",
                      "name": "John",
                      "lastname": "Doe",
                      "image": "https://cdn.sinqro.com/assets/images/placeholder_image.jpg",
                      "phone": "+34600000000",
                      "account": {
                        "id": "43",
                        "name": "My account"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Full authentication is required",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "value": []
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Consumer"
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "description": "Consumer name",
                    "type": "string"
                  },
                  "lastname": {
                    "description": "Consumer last name",
                    "type": "string"
                  },
                  "phone": {
                    "description": "Consumer phone number",
                    "type": "string"
                  },
                  "image": {
                    "description": "Consumer profile image. Json format, example:  {\"filename\":\"filename.extension\", \"data\":\"file base64 encoded\"]",
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/logout": {
      "post": {
        "summary": "Logout",
        "description": "Disable current api-user-access-token and detach from device if is necessary",
        "operationId": "logout",
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean",
                  "example": "true"
                },
                "examples": {
                  "response": {
                    "value": []
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Consumer"
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "deviceId": {
                    "description": "Device identifier",
                    "type": "integer",
                    "format": "int64"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/deviceInteractions": {
      "post": {
        "summary": "Post device interaction",
        "description": "Post device interaction",
        "operationId": "postDeviceInteraction",
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "title": "DeviceInteraction",
                  "type": "object",
                  "required": [
                    "id",
                    "totalAmount",
                    "executionTimeLabel",
                    "executionTime",
                    "consumer",
                    "status",
                    "type",
                    "sellingPoint",
                    "payments",
                    "orderLines"
                  ],
                  "description": "Order",
                  "properties": {
                    "deviceId": {
                      "type": "integer",
                      "format": "int64",
                      "example": 1221,
                      "description": "Device identifier"
                    },
                    "deviceToken": {
                      "type": "string",
                      "example": "4b6c259950e13ddc5d391baf121112bb0d3b0cc80e9d0deee375ae50329d37a2338",
                      "description": "Device token"
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": {
                      "deviceId": 1221,
                      "deviceToken": "4b6c259950e13ddc5d391baf121112bb0d3b0cc80e9d0deee375ae50329d37a2338"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Consumer"
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "description": "Device token",
                    "type": "string"
                  },
                  "appBundle": {
                    "description": "Which app bundle is using the device",
                    "type": "string"
                  },
                  "appMode": {
                    "description": "App mode",
                    "type": "string",
                    "enum": [
                      "sandbox",
                      "distribution"
                    ],
                    "default": "distribution"
                  },
                  "appVersion": {
                    "description": "App version",
                    "type": "string"
                  },
                  "deviceModel": {
                    "description": "Device model",
                    "type": "string"
                  },
                  "deviceLanguage": {
                    "description": "Device language ISO code",
                    "type": "string"
                  },
                  "deviceIp": {
                    "description": "Device IP",
                    "type": "string"
                  },
                  "latitude": {
                    "description": "Device latitude position",
                    "type": "string"
                  },
                  "longitude": {
                    "description": "Device longitude position",
                    "type": "string"
                  },
                  "batteryLevel": {
                    "description": "Device battery level",
                    "type": "number",
                    "format": "float"
                  },
                  "gpsStatus": {
                    "description": "Device gps status",
                    "type": "boolean"
                  },
                  "unlink": {
                    "description": "Unlink this device from current user",
                    "type": "boolean"
                  }
                },
                "required": [
                  "token",
                  "appBundle",
                  "appMode",
                  "appVersion",
                  "deviceModel",
                  "deviceLanguage",
                  "deviceIp"
                ]
              }
            }
          }
        }
      }
    },
    "/consumers/{consumerId}/addresses": {
      "post": {
        "summary": "Post address",
        "description": "Post new consumer address",
        "operationId": "postConsumerAddress",
        "parameters": [
          {
            "name": "consumerId",
            "in": "path",
            "description": "Consumer identifier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Address",
                  "type": "object",
                  "required": [
                    "id",
                    "street"
                  ],
                  "description": "Address",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "format": "int64",
                      "example": 1003,
                      "description": "Address identifier"
                    },
                    "street": {
                      "type": "string",
                      "example": "C/ Example, 23",
                      "description": "Address street with number"
                    },
                    "details": {
                      "type": "string",
                      "example": "Canada building",
                      "description": "Extra address information"
                    },
                    "city": {
                      "type": "string",
                      "example": "City name",
                      "description": "Address city name"
                    },
                    "province": {
                      "type": "string",
                      "example": "Province name",
                      "description": "Address province name"
                    },
                    "postalCode": {
                      "type": "string",
                      "example": "12345",
                      "description": "Address postal code"
                    },
                    "latitude": {
                      "type": "string",
                      "example": "41.308166",
                      "description": "Address latitude"
                    },
                    "longitude": {
                      "type": "string",
                      "example": "2.019725",
                      "description": "Address longitude"
                    },
                    "googlePlaceId": {
                      "type": "string",
                      "example": "xxxxxxxxxxxx",
                      "description": "Google place identifier"
                    },
                    "placeName": {
                      "type": "string",
                      "example": "C/ Example, 23, City name",
                      "description": "Place name"
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": {
                      "id": 1003,
                      "street": "C/ Example, 23",
                      "details": "Canada building",
                      "city": "City name",
                      "province": "Province name",
                      "postalCode": "12345",
                      "latitude": "41.308166",
                      "longitude": "2.019725",
                      "googlePlaceId": "xxxxxxxxxxxx",
                      "placeName": "C/ Example, 23, City name"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Address and places"
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/postConsumerAddress"
        }
      },
      "get": {
        "summary": "Get addresses",
        "description": "Get consumer addresses",
        "operationId": "getConsumerAddresses",
        "parameters": [
          {
            "name": "consumerId",
            "in": "path",
            "description": "Consumer identifier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "title": "Address",
                    "type": "object",
                    "required": [
                      "id",
                      "street"
                    ],
                    "description": "Address",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "format": "int64",
                        "example": 1003,
                        "description": "Address identifier"
                      },
                      "street": {
                        "type": "string",
                        "example": "C/ Example, 23",
                        "description": "Address street with number"
                      },
                      "details": {
                        "type": "string",
                        "example": "Canada building",
                        "description": "Extra address information"
                      },
                      "city": {
                        "type": "string",
                        "example": "City name",
                        "description": "Address city name"
                      },
                      "province": {
                        "type": "string",
                        "example": "Province name",
                        "description": "Address province name"
                      },
                      "postalCode": {
                        "type": "string",
                        "example": "12345",
                        "description": "Address postal code"
                      },
                      "latitude": {
                        "type": "string",
                        "example": "41.308166",
                        "description": "Address latitude"
                      },
                      "longitude": {
                        "type": "string",
                        "example": "2.019725",
                        "description": "Address longitude"
                      },
                      "googlePlaceId": {
                        "type": "string",
                        "example": "xxxxxxxxxxxx",
                        "description": "Google place identifier"
                      },
                      "placeName": {
                        "type": "string",
                        "example": "C/ Example, 23, City name",
                        "description": "Place name"
                      }
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": [
                      {
                        "id": 1003,
                        "street": "C/ Example, 23",
                        "details": "Canada building",
                        "city": "City name",
                        "province": "Province name",
                        "postalCode": "12345",
                        "latitude": "41.308166",
                        "longitude": "2.019725",
                        "googlePlaceId": "xxxxxxxxxxxx",
                        "placeName": "C/ Example, 23, City name"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Address and places"
        ]
      }
    },
    "/consumers/{consumerId}/addresses/{addressId}": {
      "delete": {
        "summary": "Delete address",
        "description": "Delete consumer address",
        "operationId": "deleteConsumerAddress",
        "parameters": [
          {
            "name": "consumerId",
            "in": "path",
            "description": "Consumer identifier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "addressId",
            "in": "path",
            "description": "Address identifier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean",
                  "example": "true"
                },
                "examples": {
                  "response": {
                    "value": []
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Address and places"
        ]
      }
    },
    "/addresses": {
      "post": {
        "summary": "Post address without consumer",
        "description": "Post new address without consumer",
        "operationId": "postAddress",
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Address",
                  "type": "object",
                  "required": [
                    "id",
                    "street"
                  ],
                  "description": "Address",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "format": "int64",
                      "example": 1003,
                      "description": "Address identifier"
                    },
                    "street": {
                      "type": "string",
                      "example": "C/ Example, 23",
                      "description": "Address street with number"
                    },
                    "details": {
                      "type": "string",
                      "example": "Canada building",
                      "description": "Extra address information"
                    },
                    "city": {
                      "type": "string",
                      "example": "City name",
                      "description": "Address city name"
                    },
                    "province": {
                      "type": "string",
                      "example": "Province name",
                      "description": "Address province name"
                    },
                    "postalCode": {
                      "type": "string",
                      "example": "12345",
                      "description": "Address postal code"
                    },
                    "latitude": {
                      "type": "string",
                      "example": "41.308166",
                      "description": "Address latitude"
                    },
                    "longitude": {
                      "type": "string",
                      "example": "2.019725",
                      "description": "Address longitude"
                    },
                    "googlePlaceId": {
                      "type": "string",
                      "example": "xxxxxxxxxxxx",
                      "description": "Google place identifier"
                    },
                    "placeName": {
                      "type": "string",
                      "example": "C/ Example, 23, City name",
                      "description": "Place name"
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": {
                      "id": 1003,
                      "street": "C/ Example, 23",
                      "details": "Canada building",
                      "city": "City name",
                      "province": "Province name",
                      "postalCode": "12345",
                      "latitude": "41.308166",
                      "longitude": "2.019725",
                      "googlePlaceId": "xxxxxxxxxxxx",
                      "placeName": "C/ Example, 23, City name"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Address and places"
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/postConsumerAddress"
        }
      }
    },
    "/places": {
      "post": {
        "summary": "Create place",
        "description": "Create new place using googlePlaceId or latitude and longitude",
        "operationId": "postPlace",
        "parameters": [
          {
            "name": "googlePlaceId",
            "in": "query",
            "description": "GooglePlace identifier. Required if latitude and longitude are not provided",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "latitude",
            "in": "query",
            "description": "Latitude",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "longitude",
            "in": "query",
            "description": "Longitude",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Place",
                  "type": "object",
                  "required": [
                    "id",
                    "name",
                    "key"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer",
                      "format": "int64",
                      "example": 972,
                      "description": "Place identifier"
                    },
                    "key": {
                      "type": "string",
                      "example": "av-olof-palme-08840-viladecans-barcelona-spain",
                      "description": "Place identifier key"
                    },
                    "name": {
                      "type": "string",
                      "example": "Av. Olof Palme, 08840 Viladecans, Barcelona, Spain",
                      "description": "Place name"
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": {
                      "id": 972,
                      "key": "av-olof-palme-08840-viladecans-barcelona-spain",
                      "name": "Av. Olof Palme, 08840 Viladecans, Barcelona, Spain"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Address and places"
        ]
      }
    },
    "/consumers/{consumerId}/creditCards": {
      "post": {
        "summary": "Post credit card",
        "description": "Post new consumer credit card",
        "operationId": "postConsumerCreditCard",
        "parameters": [
          {
            "name": "consumerId",
            "in": "path",
            "description": "Consumer identifier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "title": "CreditCard",
                  "type": "object",
                  "required": [
                    "id",
                    "holderName",
                    "pan"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer",
                      "format": "int64",
                      "example": 2843,
                      "description": "Credit card identifier"
                    },
                    "holderName": {
                      "type": "string",
                      "example": "John Doe",
                      "description": "Holder name"
                    },
                    "pan": {
                      "type": "string",
                      "example": "1111",
                      "description": "Last four digits of credit card number"
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": {
                      "id": 2843,
                      "holderName": "John Doe",
                      "pan": "1111"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Credit cards"
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "holderName": {
                    "description": "Holder name",
                    "type": "string"
                  },
                  "number": {
                    "description": "Credit card number",
                    "type": "integer",
                    "format": "int64"
                  },
                  "cvv": {
                    "description": "Credit card security number",
                    "type": "integer",
                    "format": "int64"
                  },
                  "expirationMonth": {
                    "description": "Expiration month in two digits format",
                    "type": "integer",
                    "format": "int64"
                  },
                  "expirationYear": {
                    "description": "Expiration year in two digits format",
                    "type": "integer",
                    "format": "int64"
                  }
                },
                "required": [
                  "holderName",
                  "number",
                  "cvv",
                  "expirationMonth",
                  "expirationYear"
                ]
              }
            }
          }
        }
      },
      "get": {
        "summary": "Get credit cards",
        "description": "Get consumer credit cards",
        "operationId": "getConsumerCreditCards",
        "parameters": [
          {
            "name": "consumerId",
            "in": "path",
            "description": "Consumer identifier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "title": "CreditCard",
                    "type": "object",
                    "required": [
                      "id",
                      "holderName",
                      "pan"
                    ],
                    "properties": {
                      "id": {
                        "type": "integer",
                        "format": "int64",
                        "example": 2843,
                        "description": "Credit card identifier"
                      },
                      "holderName": {
                        "type": "string",
                        "example": "John Doe",
                        "description": "Holder name"
                      },
                      "pan": {
                        "type": "string",
                        "example": "1111",
                        "description": "Last four digits of credit card number"
                      }
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": [
                      {
                        "id": 2843,
                        "holderName": "John Doe",
                        "pan": "1111"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Credit cards"
        ]
      }
    },
    "/consumers/{consumerId}/creditCards/{creditCardId}": {
      "delete": {
        "summary": "Delete credit card",
        "description": "Delete consumer credit card",
        "operationId": "deleteConsumerCreditCard",
        "parameters": [
          {
            "name": "consumerId",
            "in": "path",
            "description": "Consumer identifier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "creditCardId",
            "in": "path",
            "description": "Credit card identifier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean",
                  "example": "true"
                },
                "examples": {
                  "response": {
                    "value": []
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Credit cards"
        ]
      }
    },
    "/consumers/{consumerId}/coupons": {
      "post": {
        "summary": "Post coupon",
        "description": "Add coupon code to consumer coupon library. This coupon can be used in checkout.",
        "operationId": "postConsumerCoupons",
        "parameters": [
          {
            "name": "consumerId",
            "in": "path",
            "description": "Consumer identifier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Coupon",
                  "type": "object",
                  "required": [
                    "code",
                    "usages",
                    "useAllowed"
                  ],
                  "properties": {
                    "code": {
                      "type": "string",
                      "example": "discount50",
                      "description": "Coupon code"
                    },
                    "description": {
                      "type": "string",
                      "example": "50% discount in your order",
                      "description": "Coupon description"
                    },
                    "usages": {
                      "type": "integer",
                      "format": "int64",
                      "example": "0",
                      "description": "How many times consumer uses this coupon"
                    },
                    "useAllowed": {
                      "type": "boolean",
                      "example": true,
                      "description": "Return true if coupon can be used"
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": {
                      "code": "discount50",
                      "description": "50% discount in your order",
                      "usages": "0",
                      "useAllowed": true
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Coupons"
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "couponCode": {
                    "description": "Coupon code",
                    "type": "string"
                  }
                },
                "required": [
                  "couponCode"
                ]
              }
            }
          }
        }
      },
      "get": {
        "summary": "Get coupons",
        "description": "Get consumer coupons",
        "operationId": "getConsumerCoupons",
        "parameters": [
          {
            "name": "consumerId",
            "in": "path",
            "description": "Consumer identifier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "title": "Coupon",
                    "type": "object",
                    "required": [
                      "code",
                      "usages",
                      "useAllowed"
                    ],
                    "properties": {
                      "code": {
                        "type": "string",
                        "example": "discount50",
                        "description": "Coupon code"
                      },
                      "description": {
                        "type": "string",
                        "example": "50% discount in your order",
                        "description": "Coupon description"
                      },
                      "usages": {
                        "type": "integer",
                        "format": "int64",
                        "example": "0",
                        "description": "How many times consumer uses this coupon"
                      },
                      "useAllowed": {
                        "type": "boolean",
                        "example": true,
                        "description": "Return true if coupon can be used"
                      }
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": [
                      {
                        "code": "discount50",
                        "description": "50% discount in your order",
                        "usages": "0",
                        "useAllowed": true
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Coupons"
        ]
      }
    },
    "/consumers/{consumerId}/coupons/{couponCode}": {
      "delete": {
        "summary": "Delete coupon",
        "description": "Delete consumer coupon",
        "operationId": "deleteConsumerCoupon",
        "parameters": [
          {
            "name": "consumerId",
            "in": "path",
            "description": "Consumer identifier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "couponCode",
            "in": "path",
            "description": "Coupon identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean",
                  "example": "true"
                },
                "examples": {
                  "response": {
                    "value": []
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Coupons"
        ]
      }
    },
    "/markets": {
      "get": {
        "summary": "Get market by host",
        "description": "Get market by host",
        "operationId": "getMarketByHost",
        "parameters": [
          {
            "name": "host",
            "in": "query",
            "description": "Application host. Example: myrestaurant.com",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Market",
                  "type": "object",
                  "required": [
                    "id",
                    "name",
                    "status",
                    "platformId"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer",
                      "format": "int64",
                      "example": 2843,
                      "description": "Credit card identifier"
                    },
                    "name": {
                      "type": "string",
                      "example": "My Restaurant",
                      "description": "Market name"
                    },
                    "type": {
                      "type": "string",
                      "example": "Italian",
                      "description": "Type of business"
                    },
                    "status": {
                      "title": "MarketStatus",
                      "type": "object",
                      "description": "Market status",
                      "required": [
                        "code",
                        "name",
                        "color"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "active",
                          "description": "Status identifier code",
                          "enum": [
                            "pending_validation",
                            "active"
                          ]
                        },
                        "name": {
                          "type": "string",
                          "example": "Active",
                          "description": "Status name"
                        },
                        "color": {
                          "type": "string",
                          "example": "#5AAC44",
                          "description": "Status color"
                        },
                        "callToAction": {
                          "type": "string",
                          "example": "",
                          "description": "Call to action if is needed"
                        }
                      }
                    },
                    "email": {
                      "type": "string",
                      "example": "myrestaurant@example.com",
                      "description": "Contact email"
                    },
                    "phone": {
                      "type": "string",
                      "example": "+34600000000",
                      "description": "Contact phone"
                    },
                    "darkLogo": {
                      "type": "string",
                      "example": "http://mycdn.com/darkLogo.jpeg",
                      "description": "Dark logo url"
                    },
                    "lightLogo": {
                      "type": "string",
                      "example": "http://mycdn.com/lightLogo.jpeg",
                      "description": "Light logo url"
                    },
                    "horizontalLogo": {
                      "type": "string",
                      "example": "http://mycdn.com/horizontalLogo.jpeg",
                      "description": "Horizontal logo url"
                    },
                    "squareLogo": {
                      "type": "string",
                      "example": "http://mycdn.com/squareLogo.jpeg",
                      "description": "Square logo url"
                    },
                    "mainImage": {
                      "type": "string",
                      "example": "http://mycdn.com/mainImage.jpeg",
                      "description": "Main image url"
                    },
                    "icon": {
                      "type": "string",
                      "example": "http://mycdn.com/icon.ico",
                      "description": "Icon url"
                    },
                    "facebookProfileUrl": {
                      "type": "string",
                      "example": "https://www.facebook.com/myrestaurant",
                      "description": "Facebook profile url"
                    },
                    "googlePlusProfileUrl": {
                      "type": "string",
                      "example": "https://plus.google.com/myrestaurant",
                      "description": "GooglePlus profile url"
                    },
                    "instagramProfileUrl": {
                      "type": "string",
                      "example": "https://www.instagram.com/myrestaurant",
                      "description": "Instagram profile url"
                    },
                    "linkedinProfileUrl": {
                      "type": "string",
                      "example": "https://www.linkedin.com/in/myrestaurant",
                      "description": "Linkedin profile url"
                    },
                    "pinterestProfileUrl": {
                      "type": "string",
                      "example": "https://www.pinterest.com/myrestaurant",
                      "description": "Pinterest profile url"
                    },
                    "telegramProfileUrl": {
                      "type": "string",
                      "example": "https://telegram.me/myrestaurant",
                      "description": "Telegram profile url"
                    },
                    "twitterProfileUrl": {
                      "type": "string",
                      "example": "https://twitter.com/myrestaurant",
                      "description": "Twitter profile url"
                    },
                    "platformId": {
                      "type": "integer",
                      "format": "int64",
                      "example": 2843,
                      "description": "Platform identifier. Required for user login/register."
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": {
                      "id": 2843,
                      "name": "My Restaurant",
                      "type": "Italian",
                      "status": {
                        "code": "active",
                        "name": "Active",
                        "color": "#5AAC44",
                        "callToAction": ""
                      },
                      "email": "myrestaurant@example.com",
                      "phone": "+34600000000",
                      "darkLogo": "http://mycdn.com/darkLogo.jpeg",
                      "lightLogo": "http://mycdn.com/lightLogo.jpeg",
                      "horizontalLogo": "http://mycdn.com/horizontalLogo.jpeg",
                      "squareLogo": "http://mycdn.com/squareLogo.jpeg",
                      "mainImage": "http://mycdn.com/mainImage.jpeg",
                      "icon": "http://mycdn.com/icon.ico",
                      "facebookProfileUrl": "https://www.facebook.com/myrestaurant",
                      "googlePlusProfileUrl": "https://plus.google.com/myrestaurant",
                      "instagramProfileUrl": "https://www.instagram.com/myrestaurant",
                      "linkedinProfileUrl": "https://www.linkedin.com/in/myrestaurant",
                      "pinterestProfileUrl": "https://www.pinterest.com/myrestaurant",
                      "telegramProfileUrl": "https://telegram.me/myrestaurant",
                      "twitterProfileUrl": "https://twitter.com/myrestaurant",
                      "platformId": 2843
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "SellingPoint"
        ]
      }
    },
    "/sellingPoints": {
      "get": {
        "summary": "Get selling points",
        "description": "Get market selling points with availability for given order type. One of GooglePlaceId, latitude and longitude or placeKey is required.",
        "operationId": "getSellingPoints",
        "parameters": [
          {
            "name": "marketId",
            "in": "query",
            "description": "Market identifier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "orderType",
            "in": "path",
            "description": "Order type code",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "delivery",
                "collection",
                "insitu",
                "reservation"
              ]
            }
          },
          {
            "name": "googlePlaceId",
            "in": "query",
            "description": "GooglePlaceId",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "latitude",
            "in": "query",
            "description": "Latitude",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "longitude",
            "in": "query",
            "description": "Longitude",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "placeKey",
            "in": "query",
            "description": "Place key",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date",
            "in": "query",
            "description": "Date to calculate availability. If no date is provided the system will use NOW(). Example: 2017-10-10",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "title": "SellingPoint",
                    "type": "object",
                    "required": [
                      "id",
                      "name",
                      "address"
                    ],
                    "description": "Selling point data",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "format": "int64",
                        "example": 3442,
                        "description": "Selling point identifier"
                      },
                      "name": {
                        "type": "string",
                        "example": "My restaurant",
                        "description": "Selling point name"
                      },
                      "address": {
                        "title": "Address",
                        "type": "object",
                        "required": [
                          "id",
                          "street"
                        ],
                        "description": "Selling point address",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "format": "int64",
                            "example": 1003,
                            "description": "Address identifier"
                          },
                          "street": {
                            "type": "string",
                            "example": "C/ Example, 23",
                            "description": "Address street with number"
                          },
                          "details": {
                            "type": "string",
                            "example": "Canada building",
                            "description": "Extra address information"
                          },
                          "city": {
                            "type": "string",
                            "example": "City name",
                            "description": "Address city name"
                          },
                          "province": {
                            "type": "string",
                            "example": "Province name",
                            "description": "Address province name"
                          },
                          "postalCode": {
                            "type": "string",
                            "example": "12345",
                            "description": "Address postal code"
                          },
                          "latitude": {
                            "type": "string",
                            "example": "41.308166",
                            "description": "Address latitude"
                          },
                          "longitude": {
                            "type": "string",
                            "example": "2.019725",
                            "description": "Address longitude"
                          },
                          "googlePlaceId": {
                            "type": "string",
                            "example": "xxxxxxxxxxxx",
                            "description": "Google place identifier"
                          },
                          "placeName": {
                            "type": "string",
                            "example": "C/ Example, 23, City name",
                            "description": "Place name"
                          }
                        }
                      },
                      "phone": {
                        "type": "string",
                        "example": "+34600000000",
                        "description": "Selling point phone"
                      },
                      "email": {
                        "type": "string",
                        "example": "myrestaurant@example.com",
                        "description": "Selling point contact email"
                      },
                      "logo": {
                        "type": "string",
                        "example": "http://mycdn.com/selling-point-logo.jpeg",
                        "description": "Selling point logo url"
                      },
                      "mainImage": {
                        "type": "string",
                        "example": "http://mycdn.com/selling-point-main-image.jpeg",
                        "description": "Selling point main image"
                      },
                      "description": {
                        "type": "string",
                        "example": "This restaurant...",
                        "description": "Selling point description"
                      },
                      "urlKey": {
                        "type": "string",
                        "example": "restaurant-name-city",
                        "description": "Encoded name for url"
                      },
                      "type": {
                        "type": "string",
                        "example": "Italian",
                        "description": "Type of selling point"
                      },
                      "allowedOrderTypes": {
                        "type": "array",
                        "description": "Codes array of allowed order types",
                        "items": {
                          "type": "string"
                        },
                        "example": [
                          "delivery",
                          "collection",
                          "insitu",
                          "reservation"
                        ]
                      },
                      "availability": {
                        "title": "ServiceAvailability",
                        "description": "Service availability",
                        "type": "object",
                        "required": [
                          "availabilityLabelShort",
                          "desiredDayHasService",
                          "enabled",
                          "executionTimeLabel"
                        ],
                        "properties": {
                          "availabilityLabelShort": {
                            "type": "string",
                            "example": "30 min",
                            "description": "Short text representing first execution time"
                          },
                          "desiredDayHasService": {
                            "type": "boolean",
                            "example": true,
                            "description": "Return true if selling point accept given order type orders for given date"
                          },
                          "distance": {
                            "type": "number",
                            "format": "float",
                            "example": 2.34,
                            "description": "If the request is done with googlePlaceId returns the distance in kilometers between selling point and googlePlace"
                          },
                          "enabled": {
                            "type": "boolean",
                            "example": true,
                            "description": "Return true if selling point allow given order type orders"
                          },
                          "executionTimeLabel": {
                            "type": "string",
                            "example": "From 09.30h to 23.30h",
                            "description": "Short text representing day given order type schedule"
                          },
                          "firstExecutionTime": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2017-02-10T09:30:00+0000",
                            "description": "First execution time for given date"
                          },
                          "maxDiners": {
                            "type": "integer",
                            "format": "int64",
                            "example": null,
                            "description": "Maximum diners allowed for reservation"
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": [
                      {
                        "id": 3442,
                        "name": "My restaurant",
                        "address": {
                          "id": 1003,
                          "street": "C/ Example, 23",
                          "details": "Canada building",
                          "city": "City name",
                          "province": "Province name",
                          "postalCode": "12345",
                          "latitude": "41.308166",
                          "longitude": "2.019725",
                          "googlePlaceId": "xxxxxxxxxxxx",
                          "placeName": "C/ Example, 23, City name"
                        },
                        "phone": "+34600000000",
                        "email": "myrestaurant@example.com",
                        "logo": "http://mycdn.com/selling-point-logo.jpeg",
                        "mainImage": "http://mycdn.com/selling-point-main-image.jpeg",
                        "description": "This restaurant...",
                        "urlKey": "restaurant-name-city",
                        "type": "Italian",
                        "allowedOrderTypes": [
                          "delivery",
                          "collection",
                          "insitu",
                          "reservation"
                        ],
                        "availability": {
                          "availabilityLabelShort": "30 min",
                          "desiredDayHasService": true,
                          "distance": 2.34,
                          "enabled": true,
                          "executionTimeLabel": "From 09.30h to 23.30h",
                          "firstExecutionTime": "2017-02-10T09:30:00+0000"
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "tags": [
          "SellingPoint"
        ]
      }
    },
    "/markets/{marketId}/sellingPoints": {
      "get": {
        "summary": "Get selling points",
        "description": "Get market selling points",
        "operationId": "getMarketSellingPoints",
        "parameters": [
          {
            "name": "marketId",
            "in": "path",
            "description": "Market identifier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "title": "SellingPoint",
                    "type": "object",
                    "required": [
                      "id",
                      "name",
                      "address"
                    ],
                    "description": "Selling point data",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "format": "int64",
                        "example": 3442,
                        "description": "Selling point identifier"
                      },
                      "name": {
                        "type": "string",
                        "example": "My restaurant",
                        "description": "Selling point name"
                      },
                      "address": {
                        "title": "Address",
                        "type": "object",
                        "required": [
                          "id",
                          "street"
                        ],
                        "description": "Selling point address",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "format": "int64",
                            "example": 1003,
                            "description": "Address identifier"
                          },
                          "street": {
                            "type": "string",
                            "example": "C/ Example, 23",
                            "description": "Address street with number"
                          },
                          "details": {
                            "type": "string",
                            "example": "Canada building",
                            "description": "Extra address information"
                          },
                          "city": {
                            "type": "string",
                            "example": "City name",
                            "description": "Address city name"
                          },
                          "province": {
                            "type": "string",
                            "example": "Province name",
                            "description": "Address province name"
                          },
                          "postalCode": {
                            "type": "string",
                            "example": "12345",
                            "description": "Address postal code"
                          },
                          "latitude": {
                            "type": "string",
                            "example": "41.308166",
                            "description": "Address latitude"
                          },
                          "longitude": {
                            "type": "string",
                            "example": "2.019725",
                            "description": "Address longitude"
                          },
                          "googlePlaceId": {
                            "type": "string",
                            "example": "xxxxxxxxxxxx",
                            "description": "Google place identifier"
                          },
                          "placeName": {
                            "type": "string",
                            "example": "C/ Example, 23, City name",
                            "description": "Place name"
                          }
                        }
                      },
                      "phone": {
                        "type": "string",
                        "example": "+34600000000",
                        "description": "Selling point phone"
                      },
                      "email": {
                        "type": "string",
                        "example": "myrestaurant@example.com",
                        "description": "Selling point contact email"
                      },
                      "logo": {
                        "type": "string",
                        "example": "http://mycdn.com/selling-point-logo.jpeg",
                        "description": "Selling point logo url"
                      },
                      "mainImage": {
                        "type": "string",
                        "example": "http://mycdn.com/selling-point-main-image.jpeg",
                        "description": "Selling point main image"
                      },
                      "description": {
                        "type": "string",
                        "example": "This restaurant...",
                        "description": "Selling point description"
                      },
                      "urlKey": {
                        "type": "string",
                        "example": "restaurant-name-city",
                        "description": "Encoded name for url"
                      },
                      "type": {
                        "type": "string",
                        "example": "Italian",
                        "description": "Type of selling point"
                      },
                      "allowedOrderTypes": {
                        "type": "array",
                        "description": "Codes array of allowed order types",
                        "items": {
                          "type": "string"
                        },
                        "example": [
                          "delivery",
                          "collection",
                          "insitu",
                          "reservation"
                        ]
                      }
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": [
                      {
                        "id": 3442,
                        "name": "My restaurant",
                        "address": {
                          "id": 1003,
                          "street": "C/ Example, 23",
                          "details": "Canada building",
                          "city": "City name",
                          "province": "Province name",
                          "postalCode": "12345",
                          "latitude": "41.308166",
                          "longitude": "2.019725",
                          "googlePlaceId": "xxxxxxxxxxxx",
                          "placeName": "C/ Example, 23, City name"
                        },
                        "phone": "+34600000000",
                        "email": "myrestaurant@example.com",
                        "logo": "http://mycdn.com/selling-point-logo.jpeg",
                        "mainImage": "http://mycdn.com/selling-point-main-image.jpeg",
                        "description": "This restaurant...",
                        "urlKey": "restaurant-name-city",
                        "type": "Italian",
                        "allowedOrderTypes": [
                          "delivery",
                          "collection",
                          "insitu",
                          "reservation"
                        ]
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "tags": [
          "SellingPoint"
        ]
      }
    },
    "/sellingPoints/{sellingPointId}": {
      "get": {
        "summary": "Get selling point",
        "description": "Get selling point by id",
        "operationId": "getSellingPoint",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "description": "Selling point identifier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "title": "SellingPoint",
                  "type": "object",
                  "required": [
                    "id",
                    "name",
                    "address"
                  ],
                  "description": "Selling point data",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "format": "int64",
                      "example": 3442,
                      "description": "Selling point identifier"
                    },
                    "name": {
                      "type": "string",
                      "example": "My restaurant",
                      "description": "Selling point name"
                    },
                    "address": {
                      "title": "Address",
                      "type": "object",
                      "required": [
                        "id",
                        "street"
                      ],
                      "description": "Selling point address",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "format": "int64",
                          "example": 1003,
                          "description": "Address identifier"
                        },
                        "street": {
                          "type": "string",
                          "example": "C/ Example, 23",
                          "description": "Address street with number"
                        },
                        "details": {
                          "type": "string",
                          "example": "Canada building",
                          "description": "Extra address information"
                        },
                        "city": {
                          "type": "string",
                          "example": "City name",
                          "description": "Address city name"
                        },
                        "province": {
                          "type": "string",
                          "example": "Province name",
                          "description": "Address province name"
                        },
                        "postalCode": {
                          "type": "string",
                          "example": "12345",
                          "description": "Address postal code"
                        },
                        "latitude": {
                          "type": "string",
                          "example": "41.308166",
                          "description": "Address latitude"
                        },
                        "longitude": {
                          "type": "string",
                          "example": "2.019725",
                          "description": "Address longitude"
                        },
                        "googlePlaceId": {
                          "type": "string",
                          "example": "xxxxxxxxxxxx",
                          "description": "Google place identifier"
                        },
                        "placeName": {
                          "type": "string",
                          "example": "C/ Example, 23, City name",
                          "description": "Place name"
                        }
                      }
                    },
                    "phone": {
                      "type": "string",
                      "example": "+34600000000",
                      "description": "Selling point phone"
                    },
                    "email": {
                      "type": "string",
                      "example": "myrestaurant@example.com",
                      "description": "Selling point contact email"
                    },
                    "logo": {
                      "type": "string",
                      "example": "http://mycdn.com/selling-point-logo.jpeg",
                      "description": "Selling point logo url"
                    },
                    "mainImage": {
                      "type": "string",
                      "example": "http://mycdn.com/selling-point-main-image.jpeg",
                      "description": "Selling point main image"
                    },
                    "description": {
                      "type": "string",
                      "example": "This restaurant...",
                      "description": "Selling point description"
                    },
                    "urlKey": {
                      "type": "string",
                      "example": "restaurant-name-city",
                      "description": "Encoded name for url"
                    },
                    "type": {
                      "type": "string",
                      "example": "Italian",
                      "description": "Type of selling point"
                    },
                    "allowedOrderTypes": {
                      "type": "array",
                      "description": "Codes array of allowed order types",
                      "items": {
                        "type": "string"
                      },
                      "example": [
                        "delivery",
                        "collection",
                        "insitu",
                        "reservation"
                      ]
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": {
                      "id": 3442,
                      "name": "My restaurant",
                      "address": {
                        "id": 1003,
                        "street": "C/ Example, 23",
                        "details": "Canada building",
                        "city": "City name",
                        "province": "Province name",
                        "postalCode": "12345",
                        "latitude": "41.308166",
                        "longitude": "2.019725",
                        "googlePlaceId": "xxxxxxxxxxxx",
                        "placeName": "C/ Example, 23, City name"
                      },
                      "phone": "+34600000000",
                      "email": "myrestaurant@example.com",
                      "logo": "http://mycdn.com/selling-point-logo.jpeg",
                      "mainImage": "http://mycdn.com/selling-point-main-image.jpeg",
                      "description": "This restaurant...",
                      "urlKey": "restaurant-name-city",
                      "type": "Italian",
                      "allowedOrderTypes": [
                        "delivery",
                        "collection",
                        "insitu",
                        "reservation"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "SellingPoint"
        ]
      }
    },
    "/sellingPoints/{sellingPointId}/availability": {
      "get": {
        "summary": "Get selling point availability",
        "description": "Return information about selling point services",
        "operationId": "getSellingPointAvailability",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "description": "Selling point identifier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "marketId",
            "in": "query",
            "description": "Market identifier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "date",
            "in": "query",
            "description": "Date to calculate availability. If no date is provided the system will use NOW(). Example: 2017-10-10",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "title": "SellingPointServiceAvailability",
                  "description": "",
                  "type": "object",
                  "required": [
                    "deliveryServiceAvailability",
                    "collectionServiceAvailability",
                    "insituServiceAvailability",
                    "reservationServiceAvailability"
                  ],
                  "properties": {
                    "deliveryServiceAvailability": {
                      "title": "ServiceAvailability",
                      "description": "Delivery service availability",
                      "type": "object",
                      "required": [
                        "availabilityLabelShort",
                        "desiredDayHasService",
                        "enabled",
                        "executionTimeLabel"
                      ],
                      "properties": {
                        "availabilityLabelShort": {
                          "type": "string",
                          "example": "35 min",
                          "description": "Short text representing first execution time"
                        },
                        "desiredDayHasService": {
                          "type": "boolean",
                          "example": true,
                          "description": "Return true if selling point accept delivery orders for given date"
                        },
                        "distance": {
                          "type": "number",
                          "format": "float",
                          "example": 2.34,
                          "description": "If the request is done with googlePlaceId returns the distance in kilometers between selling point and googlePlace"
                        },
                        "enabled": {
                          "type": "boolean",
                          "example": true,
                          "description": "Return true if selling point allow delivery orders"
                        },
                        "executionTimeLabel": {
                          "type": "string",
                          "example": "From 09.30h to 23.30h",
                          "description": "Short text representing day delivery schedule"
                        },
                        "firstExecutionTime": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2017-02-10T09:30:00+0000",
                          "description": "First execution time for given date"
                        },
                        "maxDiners": {
                          "type": "integer",
                          "format": "int64",
                          "example": null,
                          "description": "Maximum diners allowed for reservation"
                        }
                      }
                    },
                    "collectionServiceAvailability": {
                      "title": "ServiceAvailability",
                      "description": "Collection service availability",
                      "type": "object",
                      "required": [
                        "availabilityLabelShort",
                        "desiredDayHasService",
                        "enabled",
                        "executionTimeLabel"
                      ],
                      "properties": {
                        "availabilityLabelShort": {
                          "type": "string",
                          "example": "20 min",
                          "description": "Short text representing first execution time"
                        },
                        "desiredDayHasService": {
                          "type": "boolean",
                          "example": true,
                          "description": "Return true if selling point accept collection orders for given date"
                        },
                        "distance": {
                          "type": "number",
                          "format": "float",
                          "example": null,
                          "description": "If the request is done with googlePlaceId returns the distance in kilometers between selling point and googlePlace"
                        },
                        "enabled": {
                          "type": "boolean",
                          "example": true,
                          "description": "Return true if selling point allow collection orders"
                        },
                        "executionTimeLabel": {
                          "type": "string",
                          "example": "From 08.00h to 23.30h",
                          "description": "Short text representing day collection schedule"
                        },
                        "firstExecutionTime": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2017-02-10T08:20:00+0000",
                          "description": "First execution time for given date"
                        },
                        "maxDiners": {
                          "type": "integer",
                          "format": "int64",
                          "example": null,
                          "description": "Maximum diners allowed for reservation"
                        }
                      }
                    },
                    "insituServiceAvailability": {
                      "title": "ServiceAvailability",
                      "description": "Insitu service availability",
                      "type": "object",
                      "required": [
                        "availabilityLabelShort",
                        "desiredDayHasService",
                        "enabled",
                        "executionTimeLabel"
                      ],
                      "properties": {
                        "availabilityLabelShort": {
                          "type": "string",
                          "example": "20 min",
                          "description": "Short text representing first execution time"
                        },
                        "desiredDayHasService": {
                          "type": "boolean",
                          "example": true,
                          "description": "Return true if selling point accept insitu orders for given date"
                        },
                        "distance": {
                          "type": "number",
                          "format": "float",
                          "example": null,
                          "description": "If the request is done with googlePlaceId returns the distance in kilometers between selling point and googlePlace"
                        },
                        "enabled": {
                          "type": "boolean",
                          "example": true,
                          "description": "Return true if selling point allow insitu orders"
                        },
                        "executionTimeLabel": {
                          "type": "string",
                          "example": "From 08.00h to 22.30h",
                          "description": "Short text representing day insitu schedule"
                        },
                        "firstExecutionTime": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2017-02-10T08:20:00+0000",
                          "description": "First execution time for given date"
                        },
                        "maxDiners": {
                          "type": "integer",
                          "format": "int64",
                          "example": null,
                          "description": "Maximum diners allowed for reservation"
                        }
                      }
                    },
                    "reservationServiceAvailability": {
                      "title": "ServiceAvailability",
                      "description": "Reservation service availability",
                      "type": "object",
                      "required": [
                        "availabilityLabelShort",
                        "desiredDayHasService",
                        "enabled",
                        "executionTimeLabel"
                      ],
                      "properties": {
                        "availabilityLabelShort": {
                          "type": "string",
                          "example": "20 min",
                          "description": "Short text representing first execution time"
                        },
                        "desiredDayHasService": {
                          "type": "boolean",
                          "example": true,
                          "description": "Return true if selling point accept reservation orders for given date"
                        },
                        "distance": {
                          "type": "number",
                          "format": "float",
                          "example": "",
                          "description": "If the request is done with googlePlaceId returns the distance in kilometers between selling point and googlePlace"
                        },
                        "enabled": {
                          "type": "boolean",
                          "example": true,
                          "description": "Return true if selling point allow reservation orders"
                        },
                        "executionTimeLabel": {
                          "type": "string",
                          "example": "From 08.00h to 22.30h",
                          "description": "Short text representing day reservation schedule"
                        },
                        "firstExecutionTime": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2017-02-10T09:20:00+0000",
                          "description": "First execution time for given date"
                        },
                        "maxDiners": {
                          "type": "integer",
                          "format": "int64",
                          "example": 20,
                          "description": "Maximum diners allowed for reservation"
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": {
                      "deliveryServiceAvailability": {
                        "availabilityLabelShort": "35 min",
                        "desiredDayHasService": true,
                        "distance": 2.34,
                        "enabled": true,
                        "executionTimeLabel": "From 09.30h to 23.30h",
                        "firstExecutionTime": "2017-02-10T09:30:00+0000"
                      },
                      "collectionServiceAvailability": {
                        "availabilityLabelShort": "20 min",
                        "desiredDayHasService": true,
                        "enabled": true,
                        "executionTimeLabel": "From 08.00h to 23.30h",
                        "firstExecutionTime": "2017-02-10T08:20:00+0000"
                      },
                      "insituServiceAvailability": {
                        "availabilityLabelShort": "20 min",
                        "desiredDayHasService": true,
                        "enabled": true,
                        "executionTimeLabel": "From 08.00h to 22.30h",
                        "firstExecutionTime": "2017-02-10T08:20:00+0000"
                      },
                      "reservationServiceAvailability": {
                        "availabilityLabelShort": "20 min",
                        "desiredDayHasService": true,
                        "distance": "",
                        "enabled": true,
                        "executionTimeLabel": "From 08.00h to 22.30h",
                        "firstExecutionTime": "2017-02-10T09:20:00+0000",
                        "maxDiners": 20
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "SellingPoint"
        ]
      }
    },
    "/sellingPoints/{sellingPointId}/availability/{orderType}": {
      "get": {
        "summary": "Get selling point availability for order type",
        "description": "Return information about requested type services for given selling point",
        "operationId": "getSellingPointAvailabilityByOrderType",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "description": "Selling point identifier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "orderType",
            "in": "path",
            "description": "Order type code",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "delivery",
                "collection",
                "insitu",
                "reservation"
              ]
            }
          },
          {
            "name": "marketId",
            "in": "query",
            "description": "Market identifier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "date",
            "in": "query",
            "description": "Date to calculate availability. If no date is provided the system will use NOW(). Example: 2017-10-10",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "googlePlaceId",
            "in": "query",
            "description": "GooglePlaceId used to calculate delivery conditions and services",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "title": "ServiceAvailability",
                  "description": "Service availability",
                  "type": "object",
                  "required": [
                    "availabilityLabelShort",
                    "desiredDayHasService",
                    "enabled",
                    "executionTimeLabel"
                  ],
                  "properties": {
                    "availabilityLabelShort": {
                      "type": "string",
                      "example": "30 min",
                      "description": "Short text representing first execution time"
                    },
                    "desiredDayHasService": {
                      "type": "boolean",
                      "example": true,
                      "description": "Return true if selling point accept given order type orders for given date"
                    },
                    "distance": {
                      "type": "number",
                      "format": "float",
                      "example": 2.34,
                      "description": "If the request is done with googlePlaceId returns the distance in kilometers between selling point and googlePlace"
                    },
                    "enabled": {
                      "type": "boolean",
                      "example": true,
                      "description": "Return true if selling point allow given order type orders"
                    },
                    "executionTimeLabel": {
                      "type": "string",
                      "example": "From 09.30h to 23.30h",
                      "description": "Short text representing day given order type schedule"
                    },
                    "firstExecutionTime": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2017-02-10T09:30:00+0000",
                      "description": "First execution time for given date"
                    },
                    "maxDiners": {
                      "type": "integer",
                      "format": "int64",
                      "example": null,
                      "description": "Maximum diners allowed for reservation"
                    },
                    "isOutOfRange": {
                      "type": "integer",
                      "format": "int64",
                      "example": null,
                      "description": "Only used in delivery orders. Return true if googlePlaceId is given and the place is out of delivery range"
                    },
                    "services": {
                      "type": "array",
                      "description": "Service time with conditions",
                      "items": {
                        "title": "Service",
                        "type": "object",
                        "required": [
                          "shortText",
                          "text",
                          "value"
                        ],
                        "properties": {
                          "shortText": {
                            "type": "string",
                            "example": "In 30 minutes",
                            "description": "Service execution time short description"
                          },
                          "text": {
                            "type": "string",
                            "example": "As soon as possible (30 min)",
                            "description": "Service execution time description"
                          },
                          "value": {
                            "type": "string",
                            "example": "asap",
                            "description": "Service value"
                          },
                          "serviceConditions": {
                            "title": "Service",
                            "type": "object",
                            "description": "Service conditions",
                            "required": [
                              "acceptDiscounts",
                              "cartMinProductsAmount",
                              "allowedPaymentMethods"
                            ],
                            "properties": {
                              "acceptDiscounts": {
                                "type": "boolean",
                                "example": true,
                                "description": "True if discounts can be used in this service"
                              },
                              "cartMinProductsAmount": {
                                "type": "number",
                                "format": "float",
                                "example": "5",
                                "description": "Minimum cart amount"
                              },
                              "deliveryClientBasePrice": {
                                "type": "number",
                                "format": "float",
                                "example": "1.5",
                                "description": "Delivery base price"
                              },
                              "deliveryClientPerKmPrice": {
                                "type": "number",
                                "format": "float",
                                "example": "0",
                                "description": "Delivery price increment per kilometer"
                              },
                              "maxDeliveryDistance": {
                                "type": "number",
                                "format": "float",
                                "example": "5",
                                "description": "Maximum delivery distance"
                              },
                              "freeDeliveryMaxDistance": {
                                "type": "number",
                                "format": "float",
                                "example": "0",
                                "description": "Free delivery for orders with delivery distance lower than this"
                              },
                              "freeDeliveryMinAmount": {
                                "type": "number",
                                "format": "float",
                                "example": "20",
                                "description": "Free delivery for orders with amount higher than this"
                              },
                              "reservationMaxDiners": {
                                "type": "integer",
                                "format": "int64",
                                "example": null,
                                "description": "Maximum diners allowed for reservations"
                              },
                              "checkoutSelectionLabel": {
                                "type": "string",
                                "example": "Min. cart amount 5\u20ac. Max. delivery distance 5km. Delivery price 1.5\u20ac and free for orders over 20\u20ac",
                                "description": "Text describing all service properties"
                              },
                              "allowedPaymentMethods": {
                                "type": "array",
                                "description": "Allowed payment methods for this service",
                                "items": {
                                  "title": "PaymentMethod",
                                  "type": "object",
                                  "required": [
                                    "id",
                                    "name",
                                    "code",
                                    "position"
                                  ],
                                  "properties": {
                                    "id": {
                                      "type": "integer",
                                      "format": "int64",
                                      "example": null,
                                      "description": "Payment method identifier"
                                    },
                                    "name": {
                                      "type": "string",
                                      "example": "Credit card online",
                                      "description": "Payment method name"
                                    },
                                    "code": {
                                      "type": "string",
                                      "example": "CREDIT_CARD_ONLINE",
                                      "description": "Payment method code"
                                    },
                                    "position": {
                                      "type": "integer",
                                      "format": "int64",
                                      "example": 1,
                                      "description": "Payment method position"
                                    }
                                  }
                                },
                                "example": [
                                  {
                                    "id": 2,
                                    "name": "Credit card online",
                                    "code": "CREDIT_CARD_ONLINE",
                                    "position": 1
                                  },
                                  {
                                    "id": 1,
                                    "name": "Cash",
                                    "code": "CASH_SELF_DRIVER",
                                    "position": 2
                                  },
                                  {
                                    "id": 4,
                                    "name": "Ticket Restaurant",
                                    "code": "EDENRED_SELF_DRIVER",
                                    "position": 3
                                  }
                                ]
                              }
                            }
                          }
                        }
                      },
                      "example": [
                        {
                          "shortText": "In 30 minutes",
                          "text": "As soon as possible (30 min)",
                          "value": "asap",
                          "serviceConditions": {
                            "acceptDiscounts": true,
                            "cartMinProductsAmount": 5,
                            "deliveryClientBasePrice": 1.5,
                            "deliveryClientPerKmPrice": 0,
                            "maxDeliveryDistance": 5,
                            "freeDeliveryMaxDistance": 0,
                            "freeDeliveryMinAmount": 20,
                            "reservationMaxDiners": null,
                            "checkoutSelectionLabel": "Min. cart amount 5\u20ac. Max. delivery distance 5km. Delivery price 1.5\u20ac and free for orders over 20\u20ac",
                            "allowedPaymentMethods": [
                              {
                                "id": 2,
                                "name": "Credit card online",
                                "code": "CREDIT_CARD_ONLINE",
                                "position": 1
                              },
                              {
                                "id": 1,
                                "name": "Cash",
                                "code": "CASH_SELF_DRIVER",
                                "position": 2
                              },
                              {
                                "id": 4,
                                "name": "Ticket Restaurant",
                                "code": "EDENRED_SELF_DRIVER",
                                "position": 3
                              }
                            ]
                          }
                        },
                        {
                          "shortText": "Today at 19:10h",
                          "text": "Today 10/10 at 19.10",
                          "value": "2017-10-10T17:10:00+0000",
                          "serviceConditions": {
                            "acceptDiscounts": true,
                            "cartMinProductsAmount": 5,
                            "deliveryClientBasePrice": 1.5,
                            "deliveryClientPerKmPrice": 0,
                            "maxDeliveryDistance": 5,
                            "freeDeliveryMaxDistance": 0,
                            "freeDeliveryMinAmount": 20,
                            "reservationMaxDiners": null,
                            "checkoutSelectionLabel": "Min. cart amount 5\u20ac. Max. delivery distance 5km. Delivery price 1.5\u20ac and free for orders over 20\u20ac",
                            "allowedPaymentMethods": [
                              {
                                "id": 2,
                                "name": "Credit card online",
                                "code": "CREDIT_CARD_ONLINE",
                                "position": 1
                              },
                              {
                                "id": 1,
                                "name": "Cash",
                                "code": "CASH_SELF_DRIVER",
                                "position": 2
                              },
                              {
                                "id": 4,
                                "name": "Ticket Restaurant",
                                "code": "EDENRED_SELF_DRIVER",
                                "position": 3
                              }
                            ]
                          }
                        }
                      ]
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": {
                      "availabilityLabelShort": "30 min",
                      "desiredDayHasService": true,
                      "distance": 2.34,
                      "enabled": true,
                      "executionTimeLabel": "From 09.30h to 23.30h",
                      "firstExecutionTime": "2017-02-10T09:30:00+0000",
                      "services": [
                        {
                          "shortText": "In 30 minutes",
                          "text": "As soon as possible (30 min)",
                          "value": "asap",
                          "serviceConditions": {
                            "acceptDiscounts": true,
                            "cartMinProductsAmount": 5,
                            "deliveryClientBasePrice": 1.5,
                            "deliveryClientPerKmPrice": 0,
                            "maxDeliveryDistance": 5,
                            "freeDeliveryMaxDistance": 0,
                            "freeDeliveryMinAmount": 20,
                            "reservationMaxDiners": null,
                            "checkoutSelectionLabel": "Min. cart amount 5\u20ac. Max. delivery distance 5km. Delivery price 1.5\u20ac and free for orders over 20\u20ac",
                            "allowedPaymentMethods": [
                              {
                                "id": 2,
                                "name": "Credit card online",
                                "code": "CREDIT_CARD_ONLINE",
                                "position": 1
                              },
                              {
                                "id": 1,
                                "name": "Cash",
                                "code": "CASH_SELF_DRIVER",
                                "position": 2
                              },
                              {
                                "id": 4,
                                "name": "Ticket Restaurant",
                                "code": "EDENRED_SELF_DRIVER",
                                "position": 3
                              }
                            ]
                          }
                        },
                        {
                          "shortText": "Today at 19:10h",
                          "text": "Today 10/10 at 19.10",
                          "value": "2017-10-10T17:10:00+0000",
                          "serviceConditions": {
                            "acceptDiscounts": true,
                            "cartMinProductsAmount": 5,
                            "deliveryClientBasePrice": 1.5,
                            "deliveryClientPerKmPrice": 0,
                            "maxDeliveryDistance": 5,
                            "freeDeliveryMaxDistance": 0,
                            "freeDeliveryMinAmount": 20,
                            "reservationMaxDiners": null,
                            "checkoutSelectionLabel": "Min. cart amount 5\u20ac. Max. delivery distance 5km. Delivery price 1.5\u20ac and free for orders over 20\u20ac",
                            "allowedPaymentMethods": [
                              {
                                "id": 2,
                                "name": "Credit card online",
                                "code": "CREDIT_CARD_ONLINE",
                                "position": 1
                              },
                              {
                                "id": 1,
                                "name": "Cash",
                                "code": "CASH_SELF_DRIVER",
                                "position": 2
                              },
                              {
                                "id": 4,
                                "name": "Ticket Restaurant",
                                "code": "EDENRED_SELF_DRIVER",
                                "position": 3
                              }
                            ]
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "SellingPoint"
        ]
      }
    },
    "/sellingPoints/{sellingPointId}/menus": {
      "get": {
        "summary": "Get selling point menus",
        "description": "Get menus",
        "operationId": "getSellingPointMenus",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "description": "sellingPoint identifier",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "date",
            "in": "query",
            "description": "Filter by date. If no date is provided the system will use NOW(). Example: 2017-10-10",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "orderType",
            "in": "query",
            "description": "Filter by order type",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "delivery",
                "collection",
                "insitu"
              ],
              "default": ""
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "title": "Menu",
                    "description": "",
                    "type": "object",
                    "required": [
                      "id",
                      "name"
                    ],
                    "properties": {
                      "id": {
                        "type": "integer",
                        "format": "int64",
                        "example": "543",
                        "description": "Menu identifier"
                      },
                      "name": {
                        "type": "string",
                        "example": "Pizzas",
                        "description": "Menu name"
                      },
                      "price": {
                        "type": "number",
                        "format": "float",
                        "example": "",
                        "description": "Menu price"
                      },
                      "type": {
                        "type": "string",
                        "example": "menu",
                        "description": "Menu type code",
                        "enum": [
                          "menu",
                          "setmenu"
                        ]
                      },
                      "shortDescription": {
                        "type": "string",
                        "example": "Our best pizzas",
                        "description": "Menu description"
                      },
                      "position": {
                        "type": "integer",
                        "format": "int32",
                        "example": "1",
                        "description": "Menu position"
                      },
                      "availableFrom": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2017-02-12T21:30:00+0000",
                        "description": "Menu available from time"
                      },
                      "availableTo": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2017-02-12T21:30:00+0000",
                        "description": "Menu available to time"
                      },
                      "allowedOrderTypes": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "Delivery contract request postal codes",
                        "example": [
                          "delivery",
                          "collection"
                        ]
                      },
                      "scheduleLabel": {
                        "type": "string",
                        "example": "All days from 09:00h to 22:00h",
                        "description": "Text describing menu schedule"
                      },
                      "menuSections": {
                        "type": "array",
                        "description": "Menu sections containing products",
                        "items": {
                          "title": "MenuSection",
                          "description": "",
                          "type": "object",
                          "required": [
                            "id",
                            "name"
                          ],
                          "properties": {
                            "id": {
                              "type": "integer",
                              "format": "int64",
                              "example": "298",
                              "description": "Menu section identifier"
                            },
                            "name": {
                              "type": "string",
                              "example": "Gluten free",
                              "description": "Menu section name"
                            },
                            "shortDescription": {
                              "type": "string",
                              "example": "Gluten free pizzas",
                              "description": "Menu section short description"
                            },
                            "position": {
                              "type": "integer",
                              "format": "int32",
                              "example": "1",
                              "description": "Menu section position"
                            },
                            "minSelection": {
                              "type": "integer",
                              "format": "int32",
                              "example": "0",
                              "description": "Minimum of options selected for menu section"
                            },
                            "maxSelection": {
                              "type": "integer",
                              "format": "int32",
                              "example": "0",
                              "description": "Maximum of options selected for menu section"
                            },
                            "selectionLabel": {
                              "type": "string",
                              "example": "",
                              "description": "Text describing minimum and maximum selection options"
                            },
                            "products": {
                              "type": "array",
                              "description": "Menu section products",
                              "items": {
                                "title": "Product",
                                "description": "",
                                "type": "object",
                                "required": [
                                  "id",
                                  "name"
                                ],
                                "properties": {
                                  "id": {
                                    "type": "integer",
                                    "format": "int64",
                                    "example": "843",
                                    "description": "Product identifier"
                                  },
                                  "name": {
                                    "type": "string",
                                    "example": "Neapolitan Pizza",
                                    "description": "Product name"
                                  },
                                  "shortDescription": {
                                    "type": "string",
                                    "example": "Tomatoes, cheese, oil, and garlic",
                                    "description": "Product short description"
                                  },
                                  "image": {
                                    "type": "string",
                                    "example": "https://cdn.sinqro.com/assets/images/placeholder_image.jpg",
                                    "description": "Product image url"
                                  },
                                  "price": {
                                    "type": "number",
                                    "format": "float",
                                    "example": "11.50",
                                    "description": "Product price"
                                  },
                                  "parentName": {
                                    "type": "string",
                                    "example": "",
                                    "description": "Parent product name, used in product variants"
                                  },
                                  "isAvailable": {
                                    "type": "boolean",
                                    "example": "false",
                                    "description": "Returns if product can be purchased"
                                  },
                                  "tags": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    },
                                    "example": [
                                      "pizza",
                                      "gluten-free"
                                    ],
                                    "description": "Tag products"
                                  },
                                  "productOptionsCategories": {
                                    "type": "array",
                                    "description": "Product options categories",
                                    "items": {
                                      "title": "ProductOptionCategory",
                                      "description": "",
                                      "type": "object",
                                      "required": [
                                        "id",
                                        "name"
                                      ],
                                      "properties": {
                                        "id": {
                                          "type": "integer",
                                          "format": "int64",
                                          "example": "102",
                                          "description": "Product option category identifier"
                                        },
                                        "name": {
                                          "type": "string",
                                          "example": "Our ingredients",
                                          "description": "Product option category name"
                                        },
                                        "description": {
                                          "type": "string",
                                          "example": "What do you put on your pizza?",
                                          "description": "Product option category description"
                                        },
                                        "position": {
                                          "type": "integer",
                                          "format": "int32",
                                          "example": "1",
                                          "description": "Product option category position"
                                        },
                                        "maxSelection": {
                                          "type": "integer",
                                          "format": "int32",
                                          "example": "10",
                                          "description": "Maximum of options selected for product option category"
                                        },
                                        "minSelection": {
                                          "type": "integer",
                                          "format": "int32",
                                          "example": "",
                                          "description": "Minimum of options selected for product option category"
                                        },
                                        "maxSameOptionSelection": {
                                          "type": "integer",
                                          "format": "int32",
                                          "example": "2",
                                          "description": "Maximum times of same option can be selected"
                                        },
                                        "selectionLabel": {
                                          "type": "string",
                                          "example": "Max. 10",
                                          "description": "Text describing minimum and maximum selection options"
                                        },
                                        "productOptions": {
                                          "type": "array",
                                          "description": "Product options for product option category",
                                          "items": {
                                            "title": "ProductOption",
                                            "description": "",
                                            "type": "object",
                                            "required": [
                                              "id",
                                              "name"
                                            ],
                                            "properties": {
                                              "id": {
                                                "type": "integer",
                                                "format": "int64",
                                                "example": "233",
                                                "description": "Product identifier"
                                              },
                                              "name": {
                                                "type": "string",
                                                "example": "Cheddar",
                                                "description": "Product name"
                                              },
                                              "shortDescription": {
                                                "type": "string",
                                                "example": "Add cheddar to your pizza",
                                                "description": "Product option short description"
                                              },
                                              "price": {
                                                "type": "number",
                                                "format": "float",
                                                "example": "0.75",
                                                "description": "Product option price"
                                              },
                                              "position": {
                                                "type": "integer",
                                                "format": "int32",
                                                "example": "1",
                                                "description": "Product option position"
                                              },
                                              "isAvailable": {
                                                "type": "boolean",
                                                "example": "true",
                                                "description": "Returns if product option can be purchased"
                                              }
                                            }
                                          }
                                        }
                                      }
                                    }
                                  },
                                  "productVariants": {
                                    "type": "array",
                                    "description": "Product variants",
                                    "items": {
                                      "title": "Product",
                                      "description": "",
                                      "type": "object",
                                      "required": [
                                        "id",
                                        "name"
                                      ],
                                      "properties": {
                                        "id": {
                                          "type": "integer",
                                          "format": "int64",
                                          "example": "843",
                                          "description": "Product identifier"
                                        },
                                        "name": {
                                          "type": "string",
                                          "example": "XXL size",
                                          "description": "Product name"
                                        },
                                        "shortDescription": {
                                          "type": "string",
                                          "example": "Tomatoes, cheese, oil, and garlic",
                                          "description": "Product short description"
                                        },
                                        "image": {
                                          "type": "string",
                                          "example": "https://cdn.sinqro.com/assets/images/placeholder_image.jpg",
                                          "description": "Product image url"
                                        },
                                        "price": {
                                          "type": "number",
                                          "format": "float",
                                          "example": "11.50",
                                          "description": "Product price"
                                        },
                                        "parentName": {
                                          "type": "string",
                                          "example": "",
                                          "description": "Parent product name, used in product variants"
                                        },
                                        "isAvailable": {
                                          "type": "boolean",
                                          "example": "false",
                                          "description": "Returns if product can be purchased"
                                        },
                                        "tags": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          },
                                          "example": [
                                            "pizza",
                                            "gluten-free"
                                          ],
                                          "description": "Tag products"
                                        },
                                        "productOptionsCategories": {
                                          "type": "array",
                                          "description": "Product options categories",
                                          "items": {
                                            "title": "ProductOptionCategory",
                                            "description": "",
                                            "type": "object",
                                            "required": [
                                              "id",
                                              "name"
                                            ],
                                            "properties": {
                                              "id": {
                                                "type": "integer",
                                                "format": "int64",
                                                "example": "102",
                                                "description": "Product option category identifier"
                                              },
                                              "name": {
                                                "type": "string",
                                                "example": "Our ingredients",
                                                "description": "Product option category name"
                                              },
                                              "description": {
                                                "type": "string",
                                                "example": "What do you put on your pizza?",
                                                "description": "Product option category description"
                                              },
                                              "position": {
                                                "type": "integer",
                                                "format": "int32",
                                                "example": "1",
                                                "description": "Product option category position"
                                              },
                                              "maxSelection": {
                                                "type": "integer",
                                                "format": "int32",
                                                "example": "10",
                                                "description": "Maximum of options selected for product option category"
                                              },
                                              "minSelection": {
                                                "type": "integer",
                                                "format": "int32",
                                                "example": "",
                                                "description": "Minimum of options selected for product option category"
                                              },
                                              "maxSameOptionSelection": {
                                                "type": "integer",
                                                "format": "int32",
                                                "example": "2",
                                                "description": "Maximum times of same option can be selected"
                                              },
                                              "selectionLabel": {
                                                "type": "string",
                                                "example": "Max. 10",
                                                "description": "Text describing minimum and maximum selection options"
                                              },
                                              "productOptions": {
                                                "type": "array",
                                                "description": "Product options for product option category",
                                                "items": {
                                                  "title": "ProductOption",
                                                  "description": "",
                                                  "type": "object",
                                                  "required": [
                                                    "id",
                                                    "name"
                                                  ],
                                                  "properties": {
                                                    "id": {
                                                      "type": "integer",
                                                      "format": "int64",
                                                      "example": "233",
                                                      "description": "Product identifier"
                                                    },
                                                    "name": {
                                                      "type": "string",
                                                      "example": "Cheddar",
                                                      "description": "Product name"
                                                    },
                                                    "shortDescription": {
                                                      "type": "string",
                                                      "example": "Add cheddar to your pizza",
                                                      "description": "Product option short description"
                                                    },
                                                    "price": {
                                                      "type": "number",
                                                      "format": "float",
                                                      "example": "0.75",
                                                      "description": "Product option price"
                                                    },
                                                    "position": {
                                                      "type": "integer",
                                                      "format": "int32",
                                                      "example": "1",
                                                      "description": "Product option position"
                                                    },
                                                    "isAvailable": {
                                                      "type": "boolean",
                                                      "example": "true",
                                                      "description": "Returns if product option can be purchased"
                                                    }
                                                  }
                                                }
                                              }
                                            }
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": [
                      {
                        "id": "543",
                        "name": "Pizzas",
                        "price": "",
                        "type": "menu",
                        "shortDescription": "Our best pizzas",
                        "position": "1",
                        "availableFrom": "2017-02-12T21:30:00+0000",
                        "availableTo": "2017-02-12T21:30:00+0000",
                        "allowedOrderTypes": [
                          "delivery",
                          "collection"
                        ],
                        "scheduleLabel": "All days from 09:00h to 22:00h",
                        "menuSections": [
                          {
                            "id": "298",
                            "name": "Gluten free",
                            "shortDescription": "Gluten free pizzas",
                            "position": "1",
                            "minSelection": "0",
                            "maxSelection": "0",
                            "selectionLabel": "",
                            "products": [
                              {
                                "id": "843",
                                "name": "Neapolitan Pizza",
                                "shortDescription": "Tomatoes, cheese, oil, and garlic",
                                "image": "https://cdn.sinqro.com/assets/images/placeholder_image.jpg",
                                "price": "11.50",
                                "parentName": "",
                                "isAvailable": "false",
                                "tags": [
                                  "pizza",
                                  "gluten-free"
                                ],
                                "productOptionsCategories": [
                                  {
                                    "id": "102",
                                    "name": "Our ingredients",
                                    "description": "What do you put on your pizza?",
                                    "position": "1",
                                    "maxSelection": "10",
                                    "minSelection": "",
                                    "maxSameOptionSelection": "2",
                                    "selectionLabel": "Max. 10",
                                    "productOptions": [
                                      {
                                        "id": "233",
                                        "name": "Cheddar",
                                        "shortDescription": "Add cheddar to your pizza",
                                        "price": "0.75",
                                        "position": "1",
                                        "isAvailable": "true"
                                      }
                                    ]
                                  }
                                ],
                                "productVariants": [
                                  {
                                    "id": "843",
                                    "name": "XXL size",
                                    "shortDescription": "Tomatoes, cheese, oil, and garlic",
                                    "image": "https://cdn.sinqro.com/assets/images/placeholder_image.jpg",
                                    "price": "11.50",
                                    "parentName": "",
                                    "isAvailable": "false",
                                    "tags": [
                                      "pizza",
                                      "gluten-free"
                                    ],
                                    "productOptionsCategories": [
                                      {
                                        "id": "102",
                                        "name": "Our ingredients",
                                        "description": "What do you put on your pizza?",
                                        "position": "1",
                                        "maxSelection": "10",
                                        "minSelection": "",
                                        "maxSameOptionSelection": "2",
                                        "selectionLabel": "Max. 10",
                                        "productOptions": [
                                          {
                                            "id": "233",
                                            "name": "Cheddar",
                                            "shortDescription": "Add cheddar to your pizza",
                                            "price": "0.75",
                                            "position": "1",
                                            "isAvailable": "true"
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                ]
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "tags": [
          "SellingPoint"
        ]
      }
    },
    "/sellingPoints/{sellingPointId}/exceptions/next": {
      "get": {
        "summary": "Get selling point exceptions",
        "description": "Get selling point next exceptions",
        "operationId": "getSellingPointExceptions",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "description": "Selling point identifier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "title": "SellingPointException",
                    "description": "",
                    "type": "object",
                    "required": [
                      "id",
                      "sellingPointEnabled",
                      "collectionOrdersEnabled",
                      "deliveryOrdersEnabled",
                      "insituOrdersEnabled",
                      "reservationsEnabled",
                      "startsAt",
                      "expiresAt"
                    ],
                    "properties": {
                      "id": {
                        "type": "integer",
                        "format": "int64",
                        "example": 872,
                        "description": "Selling point exception identifier"
                      },
                      "sellingPointEnabled": {
                        "type": "boolean",
                        "example": false,
                        "description": "Return if selling point is active"
                      },
                      "collectionOrdersEnabled": {
                        "type": "boolean",
                        "example": false,
                        "description": "Return if collection service is active"
                      },
                      "deliveryOrdersEnabled": {
                        "type": "boolean",
                        "example": false,
                        "description": "Return if delivery service is active"
                      },
                      "insituOrdersEnabled": {
                        "type": "boolean",
                        "example": false,
                        "description": "Return if insitu service is active"
                      },
                      "reservationsEnabled": {
                        "type": "boolean",
                        "example": false,
                        "description": "Return if reservation service is active"
                      },
                      "startsAt": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2017-10-14T22:00:00+0000",
                        "description": "Exception start time"
                      },
                      "expiresAt": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2017-10-15T21:59:00+0000",
                        "description": "Exception end time"
                      }
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": [
                      {
                        "id": 872,
                        "sellingPointEnabled": false,
                        "collectionOrdersEnabled": false,
                        "deliveryOrdersEnabled": false,
                        "insituOrdersEnabled": false,
                        "reservationsEnabled": false,
                        "startsAt": "2017-10-14T22:00:00+0000",
                        "expiresAt": "2017-10-15T21:59:00+0000"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "tags": [
          "SellingPoint"
        ]
      }
    },
    "/sellingPoints/{sellingPointId}/products/{productId}": {
      "get": {
        "summary": "Get selling point product",
        "description": "Get product",
        "operationId": "getSellingPointProduct",
        "parameters": [
          {
            "name": "sellingPointId",
            "in": "path",
            "description": "sellingPoint identifier",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "productId",
            "in": "path",
            "description": "Product identifier",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Product",
                  "description": "",
                  "type": "object",
                  "required": [
                    "id",
                    "name"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer",
                      "format": "int64",
                      "example": "843",
                      "description": "Product identifier"
                    },
                    "name": {
                      "type": "string",
                      "example": "Neapolitan Pizza",
                      "description": "Product name"
                    },
                    "shortDescription": {
                      "type": "string",
                      "example": "Tomatoes, cheese, oil, and garlic",
                      "description": "Product short description"
                    },
                    "image": {
                      "type": "string",
                      "example": "https://cdn.sinqro.com/assets/images/placeholder_image.jpg",
                      "description": "Product image url"
                    },
                    "price": {
                      "type": "number",
                      "format": "float",
                      "example": "11.50",
                      "description": "Product price"
                    },
                    "parentName": {
                      "type": "string",
                      "example": "",
                      "description": "Parent product name, used in product variants"
                    },
                    "isAvailable": {
                      "type": "boolean",
                      "example": "false",
                      "description": "Returns if product can be purchased"
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "example": [
                        "pizza",
                        "gluten-free"
                      ],
                      "description": "Tag products"
                    },
                    "productOptionsCategories": {
                      "type": "array",
                      "description": "Product options categories",
                      "items": {
                        "title": "ProductOptionCategory",
                        "description": "",
                        "type": "object",
                        "required": [
                          "id",
                          "name"
                        ],
                        "properties": {
                          "id": {
                            "type": "integer",
                            "format": "int64",
                            "example": "102",
                            "description": "Product option category identifier"
                          },
                          "name": {
                            "type": "string",
                            "example": "Our ingredients",
                            "description": "Product option category name"
                          },
                          "description": {
                            "type": "string",
                            "example": "What do you put on your pizza?",
                            "description": "Product option category description"
                          },
                          "position": {
                            "type": "integer",
                            "format": "int32",
                            "example": "1",
                            "description": "Product option category position"
                          },
                          "maxSelection": {
                            "type": "integer",
                            "format": "int32",
                            "example": "10",
                            "description": "Maximum of options selected for product option category"
                          },
                          "minSelection": {
                            "type": "integer",
                            "format": "int32",
                            "example": "",
                            "description": "Minimum of options selected for product option category"
                          },
                          "maxSameOptionSelection": {
                            "type": "integer",
                            "format": "int32",
                            "example": "2",
                            "description": "Maximum times of same option can be selected"
                          },
                          "selectionLabel": {
                            "type": "string",
                            "example": "Max. 10",
                            "description": "Text describing minimum and maximum selection options"
                          },
                          "productOptions": {
                            "type": "array",
                            "description": "Product options for product option category",
                            "items": {
                              "title": "ProductOption",
                              "description": "",
                              "type": "object",
                              "required": [
                                "id",
                                "name"
                              ],
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "format": "int64",
                                  "example": "233",
                                  "description": "Product identifier"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Cheddar",
                                  "description": "Product name"
                                },
                                "shortDescription": {
                                  "type": "string",
                                  "example": "Add cheddar to your pizza",
                                  "description": "Product option short description"
                                },
                                "price": {
                                  "type": "number",
                                  "format": "float",
                                  "example": "0.75",
                                  "description": "Product option price"
                                },
                                "position": {
                                  "type": "integer",
                                  "format": "int32",
                                  "example": "1",
                                  "description": "Product option position"
                                },
                                "isAvailable": {
                                  "type": "boolean",
                                  "example": "true",
                                  "description": "Returns if product option can be purchased"
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "productVariants": {
                      "type": "array",
                      "description": "Product variants",
                      "items": {
                        "title": "Product",
                        "description": "",
                        "type": "object",
                        "required": [
                          "id",
                          "name"
                        ],
                        "properties": {
                          "id": {
                            "type": "integer",
                            "format": "int64",
                            "example": "843",
                            "description": "Product identifier"
                          },
                          "name": {
                            "type": "string",
                            "example": "XXL size",
                            "description": "Product name"
                          },
                          "shortDescription": {
                            "type": "string",
                            "example": "Tomatoes, cheese, oil, and garlic",
                            "description": "Product short description"
                          },
                          "image": {
                            "type": "string",
                            "example": "https://cdn.sinqro.com/assets/images/placeholder_image.jpg",
                            "description": "Product image url"
                          },
                          "price": {
                            "type": "number",
                            "format": "float",
                            "example": "11.50",
                            "description": "Product price"
                          },
                          "parentName": {
                            "type": "string",
                            "example": "",
                            "description": "Parent product name, used in product variants"
                          },
                          "isAvailable": {
                            "type": "boolean",
                            "example": "false",
                            "description": "Returns if product can be purchased"
                          },
                          "tags": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "example": [
                              "pizza",
                              "gluten-free"
                            ],
                            "description": "Tag products"
                          },
                          "productOptionsCategories": {
                            "type": "array",
                            "description": "Product options categories",
                            "items": {
                              "title": "ProductOptionCategory",
                              "description": "",
                              "type": "object",
                              "required": [
                                "id",
                                "name"
                              ],
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "format": "int64",
                                  "example": "102",
                                  "description": "Product option category identifier"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Our ingredients",
                                  "description": "Product option category name"
                                },
                                "description": {
                                  "type": "string",
                                  "example": "What do you put on your pizza?",
                                  "description": "Product option category description"
                                },
                                "position": {
                                  "type": "integer",
                                  "format": "int32",
                                  "example": "1",
                                  "description": "Product option category position"
                                },
                                "maxSelection": {
                                  "type": "integer",
                                  "format": "int32",
                                  "example": "10",
                                  "description": "Maximum of options selected for product option category"
                                },
                                "minSelection": {
                                  "type": "integer",
                                  "format": "int32",
                                  "example": "",
                                  "description": "Minimum of options selected for product option category"
                                },
                                "maxSameOptionSelection": {
                                  "type": "integer",
                                  "format": "int32",
                                  "example": "2",
                                  "description": "Maximum times of same option can be selected"
                                },
                                "selectionLabel": {
                                  "type": "string",
                                  "example": "Max. 10",
                                  "description": "Text describing minimum and maximum selection options"
                                },
                                "productOptions": {
                                  "type": "array",
                                  "description": "Product options for product option category",
                                  "items": {
                                    "title": "ProductOption",
                                    "description": "",
                                    "type": "object",
                                    "required": [
                                      "id",
                                      "name"
                                    ],
                                    "properties": {
                                      "id": {
                                        "type": "integer",
                                        "format": "int64",
                                        "example": "233",
                                        "description": "Product identifier"
                                      },
                                      "name": {
                                        "type": "string",
                                        "example": "Cheddar",
                                        "description": "Product name"
                                      },
                                      "shortDescription": {
                                        "type": "string",
                                        "example": "Add cheddar to your pizza",
                                        "description": "Product option short description"
                                      },
                                      "price": {
                                        "type": "number",
                                        "format": "float",
                                        "example": "0.75",
                                        "description": "Product option price"
                                      },
                                      "position": {
                                        "type": "integer",
                                        "format": "int32",
                                        "example": "1",
                                        "description": "Product option position"
                                      },
                                      "isAvailable": {
                                        "type": "boolean",
                                        "example": "true",
                                        "description": "Returns if product option can be purchased"
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": {
                      "id": "843",
                      "name": "Neapolitan Pizza",
                      "shortDescription": "Tomatoes, cheese, oil, and garlic",
                      "image": "https://cdn.sinqro.com/assets/images/placeholder_image.jpg",
                      "price": "11.50",
                      "parentName": "",
                      "isAvailable": "false",
                      "tags": [
                        "pizza",
                        "gluten-free"
                      ],
                      "productOptionsCategories": [
                        {
                          "id": "102",
                          "name": "Our ingredients",
                          "description": "What do you put on your pizza?",
                          "position": "1",
                          "maxSelection": "10",
                          "minSelection": "",
                          "maxSameOptionSelection": "2",
                          "selectionLabel": "Max. 10",
                          "productOptions": [
                            {
                              "id": "233",
                              "name": "Cheddar",
                              "shortDescription": "Add cheddar to your pizza",
                              "price": "0.75",
                              "position": "1",
                              "isAvailable": "true"
                            }
                          ]
                        }
                      ],
                      "productVariants": [
                        {
                          "id": "843",
                          "name": "XXL size",
                          "shortDescription": "Tomatoes, cheese, oil, and garlic",
                          "image": "https://cdn.sinqro.com/assets/images/placeholder_image.jpg",
                          "price": "11.50",
                          "parentName": "",
                          "isAvailable": "false",
                          "tags": [
                            "pizza",
                            "gluten-free"
                          ],
                          "productOptionsCategories": [
                            {
                              "id": "102",
                              "name": "Our ingredients",
                              "description": "What do you put on your pizza?",
                              "position": "1",
                              "maxSelection": "10",
                              "minSelection": "",
                              "maxSameOptionSelection": "2",
                              "selectionLabel": "Max. 10",
                              "productOptions": [
                                {
                                  "id": "233",
                                  "name": "Cheddar",
                                  "shortDescription": "Add cheddar to your pizza",
                                  "price": "0.75",
                                  "position": "1",
                                  "isAvailable": "true"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "SellingPoint"
        ]
      }
    },
    "/markets/{marketId}/conditions": {
      "get": {
        "summary": "Get market legal conditions",
        "description": "Get market legal conditions for clients",
        "operationId": "getMarketConditions",
        "parameters": [
          {
            "name": "marketId",
            "in": "path",
            "description": "Market identifier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "example": " CONDITIONS ... "
                },
                "examples": {
                  "response": {
                    "value": []
                  }
                }
              }
            }
          }
        },
        "tags": [
          "SellingPoint"
        ]
      }
    },
    "/checkout/validation": {
      "post": {
        "summary": "Checkout validation",
        "description": "Used to check if order can be created.",
        "operationId": "postOrderValidation",
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "title": "CheckoutValidation",
                  "description": "",
                  "type": "object",
                  "required": [
                    "checkout",
                    "validations"
                  ],
                  "properties": {
                    "checkout": {
                      "title": "Checkout",
                      "description": "",
                      "type": "object",
                      "required": [
                        "checkout",
                        "validations"
                      ],
                      "properties": {
                        "address": {
                          "title": "Delivery order address. Only for delivery orders",
                          "type": "object",
                          "required": [
                            "id",
                            "street"
                          ],
                          "description": "",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "format": "int64",
                              "example": 1003,
                              "description": "Address identifier"
                            },
                            "street": {
                              "type": "string",
                              "example": "C/ Example, 23",
                              "description": "Address street with number"
                            },
                            "details": {
                              "type": "string",
                              "example": "Canada building",
                              "description": "Extra address information"
                            },
                            "city": {
                              "type": "string",
                              "example": "City name",
                              "description": "Address city name"
                            },
                            "province": {
                              "type": "string",
                              "example": "Province name",
                              "description": "Address province name"
                            },
                            "postalCode": {
                              "type": "string",
                              "example": "12345",
                              "description": "Address postal code"
                            },
                            "latitude": {
                              "type": "string",
                              "example": "41.308166",
                              "description": "Address latitude"
                            },
                            "longitude": {
                              "type": "string",
                              "example": "2.019725",
                              "description": "Address longitude"
                            },
                            "googlePlaceId": {
                              "type": "string",
                              "example": "xxxxxxxxxxxx",
                              "description": "Google place identifier"
                            },
                            "placeName": {
                              "type": "string",
                              "example": "C/ Example, 23, City name",
                              "description": "Place name"
                            }
                          }
                        },
                        "cartAmount": {
                          "type": "number",
                          "format": "float",
                          "example": 21,
                          "description": "Cart amount"
                        },
                        "comment": {
                          "type": "string",
                          "example": "Thank you",
                          "description": "Consumer order comment"
                        },
                        "consumer": {
                          "title": "Consumer",
                          "description": "",
                          "type": "object",
                          "required": [
                            "id",
                            "name",
                            "email"
                          ],
                          "properties": {
                            "id": {
                              "type": "integer",
                              "format": "int64",
                              "example": "1003",
                              "description": "Consumer identifier"
                            },
                            "email": {
                              "type": "string",
                              "example": "john@example.com",
                              "description": "Consumer email"
                            },
                            "name": {
                              "type": "string",
                              "example": "John",
                              "description": "Consumer name"
                            },
                            "lastname": {
                              "type": "string",
                              "example": "Doe",
                              "description": "Consumer last name"
                            },
                            "image": {
                              "type": "string",
                              "example": "https://cdn.sinqro.com/assets/images/placeholder_image.jpg",
                              "description": "Consumer profile image url"
                            },
                            "phone": {
                              "type": "string",
                              "example": "+34600000000",
                              "description": "In international format. Ex. +34600000000"
                            },
                            "account": {
                              "title": "Account",
                              "description": "Consumer account",
                              "type": "object",
                              "required": [
                                "id",
                                "name"
                              ],
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "format": "int32",
                                  "example": "43",
                                  "description": "Account identifier"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "My account",
                                  "description": "Account name"
                                }
                              }
                            }
                          }
                        },
                        "couponCode": {
                          "type": "string",
                          "example": "discount20",
                          "description": "Coupon code used in checkout"
                        },
                        "deliveryAmount": {
                          "type": "number",
                          "format": "float",
                          "example": "1.50",
                          "description": "Delivery amount. Only for delivery orders"
                        },
                        "deliveryDistance": {
                          "type": "number",
                          "format": "float",
                          "example": "1.10",
                          "description": "Delivery distance in kilometers. Only for delivery orders"
                        },
                        "discountAmount": {
                          "type": "number",
                          "format": "float",
                          "example": "4.20",
                          "description": "Discount amount for given coupon code"
                        },
                        "discountLabel": {
                          "type": "string",
                          "example": "20% of discount",
                          "description": "Discount label"
                        },
                        "executionTime": {
                          "type": "string",
                          "example": "2017-10-12T10:10:00+0000",
                          "description": "Selected execution time. Can be asap or date time value like 2017-10-12T10:10:00+0000"
                        },
                        "items": {
                          "type": "array",
                          "description": "Cart items",
                          "items": {
                            "title": "Item",
                            "description": "",
                            "type": "object",
                            "required": [
                              "name",
                              "quantity",
                              "totalPrice",
                              "unitAdditionalPrice",
                              "unitFinalPrice",
                              "unitPrice",
                              "type"
                            ],
                            "properties": {
                              "comment": {
                                "type": "string",
                                "example": "",
                                "description": "Consumer item comment"
                              },
                              "name": {
                                "type": "string",
                                "example": "Margherita",
                                "description": "Item name"
                              },
                              "image": {
                                "type": "string",
                                "example": "http://mycdn.com/item-image.jpeg",
                                "description": "Item image"
                              },
                              "quantity": {
                                "type": "integer",
                                "format": "int64",
                                "example": "2",
                                "description": "Quantity of same item"
                              },
                              "totalPrice": {
                                "type": "number",
                                "format": "float",
                                "example": "21",
                                "description": "Item total price. (UnitFinalPrice x Quantity)"
                              },
                              "unitAdditionalPrice": {
                                "type": "number",
                                "format": "float",
                                "example": "1.50",
                                "description": "Unit additional price"
                              },
                              "unitFinalPrice": {
                                "type": "number",
                                "format": "float",
                                "example": "10.50",
                                "description": "Unit final price. (UnitPrice + UnitAdditionalPrice)"
                              },
                              "unitPrice": {
                                "type": "number",
                                "format": "float",
                                "example": "9",
                                "description": "Unit price"
                              },
                              "type": {
                                "type": "string",
                                "example": "product",
                                "description": "Item type code",
                                "enum": [
                                  "menu",
                                  "product",
                                  "product-option"
                                ]
                              },
                              "items": {
                                "type": "array",
                                "description": "Children items",
                                "items": {
                                  "title": "ProductOption",
                                  "description": "",
                                  "type": "object",
                                  "required": [
                                    "name",
                                    "quantity",
                                    "totalPrice",
                                    "unitAdditionalPrice",
                                    "unitFinalPrice",
                                    "unitPrice",
                                    "type"
                                  ],
                                  "properties": {
                                    "comment": {
                                      "type": "string",
                                      "example": "",
                                      "description": "Consumer item comment"
                                    },
                                    "name": {
                                      "type": "string",
                                      "example": "Pepperoni",
                                      "description": "Item name"
                                    },
                                    "image": {
                                      "type": "string",
                                      "example": "http://mycdn.com/item-image.jpeg",
                                      "description": "Item image"
                                    },
                                    "quantity": {
                                      "type": "integer",
                                      "format": "int64",
                                      "example": "1",
                                      "description": "Quantity of same item"
                                    },
                                    "totalPrice": {
                                      "type": "number",
                                      "format": "float",
                                      "example": "1.50",
                                      "description": "Item total price. (UnitFinalPrice x Quantity)"
                                    },
                                    "unitAdditionalPrice": {
                                      "type": "number",
                                      "format": "float",
                                      "example": "0",
                                      "description": "Unit additional price"
                                    },
                                    "unitFinalPrice": {
                                      "type": "number",
                                      "format": "float",
                                      "example": "1.50",
                                      "description": "Unit final price. (UnitPrice + UnitAdditionalPrice)"
                                    },
                                    "unitPrice": {
                                      "type": "number",
                                      "format": "float",
                                      "example": "1.50",
                                      "description": "Unit price"
                                    },
                                    "type": {
                                      "type": "string",
                                      "example": "product-option",
                                      "description": "Item type code",
                                      "enum": [
                                        "menu",
                                        "product",
                                        "product-option"
                                      ]
                                    },
                                    "items": {
                                      "type": "array",
                                      "description": "Children items",
                                      "items": {
                                        "type": "object"
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        },
                        "orderTotal": {
                          "type": "number",
                          "format": "float",
                          "example": "18.30",
                          "description": "Order total amount, including delivery and discount"
                        },
                        "orderType": {
                          "type": "string",
                          "example": "delivery",
                          "description": "Order type code",
                          "enum": [
                            "delivery",
                            "collection",
                            "insitu",
                            "reservation"
                          ]
                        },
                        "payments": {
                          "type": "array",
                          "description": "Checkout payments",
                          "items": {
                            "title": "CheckoutPayment",
                            "description": "",
                            "type": "object",
                            "required": [
                              "checkout",
                              "validations"
                            ],
                            "properties": {
                              "amount": {
                                "type": "number",
                                "format": "float",
                                "example": 18.3,
                                "description": "Payment amount"
                              },
                              "methodCode": {
                                "type": "string",
                                "example": "CREDIT_CARD_ONLINE",
                                "description": "Payment method code"
                              }
                            }
                          }
                        },
                        "sellingPoint": {
                          "title": "SellingPoint",
                          "type": "object",
                          "required": [
                            "id",
                            "name",
                            "address"
                          ],
                          "description": "Selling point data",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "format": "int64",
                              "example": 3442,
                              "description": "Selling point identifier"
                            },
                            "name": {
                              "type": "string",
                              "example": "My restaurant",
                              "description": "Selling point name"
                            },
                            "address": {
                              "title": "Address",
                              "type": "object",
                              "required": [
                                "id",
                                "street"
                              ],
                              "description": "Selling point address",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "format": "int64",
                                  "example": 1003,
                                  "description": "Address identifier"
                                },
                                "street": {
                                  "type": "string",
                                  "example": "C/ Example, 23",
                                  "description": "Address street with number"
                                },
                                "details": {
                                  "type": "string",
                                  "example": "Canada building",
                                  "description": "Extra address information"
                                },
                                "city": {
                                  "type": "string",
                                  "example": "City name",
                                  "description": "Address city name"
                                },
                                "province": {
                                  "type": "string",
                                  "example": "Province name",
                                  "description": "Address province name"
                                },
                                "postalCode": {
                                  "type": "string",
                                  "example": "12345",
                                  "description": "Address postal code"
                                },
                                "latitude": {
                                  "type": "string",
                                  "example": "41.308166",
                                  "description": "Address latitude"
                                },
                                "longitude": {
                                  "type": "string",
                                  "example": "2.019725",
                                  "description": "Address longitude"
                                },
                                "googlePlaceId": {
                                  "type": "string",
                                  "example": "xxxxxxxxxxxx",
                                  "description": "Google place identifier"
                                },
                                "placeName": {
                                  "type": "string",
                                  "example": "C/ Example, 23, City name",
                                  "description": "Place name"
                                }
                              }
                            },
                            "phone": {
                              "type": "string",
                              "example": "+34600000000",
                              "description": "Selling point phone"
                            },
                            "email": {
                              "type": "string",
                              "example": "myrestaurant@example.com",
                              "description": "Selling point contact email"
                            },
                            "logo": {
                              "type": "string",
                              "example": "http://mycdn.com/selling-point-logo.jpeg",
                              "description": "Selling point logo url"
                            },
                            "mainImage": {
                              "type": "string",
                              "example": "http://mycdn.com/selling-point-main-image.jpeg",
                              "description": "Selling point main image"
                            },
                            "description": {
                              "type": "string",
                              "example": "This restaurant...",
                              "description": "Selling point description"
                            },
                            "urlKey": {
                              "type": "string",
                              "example": "restaurant-name-city",
                              "description": "Encoded name for url"
                            },
                            "type": {
                              "type": "string",
                              "example": "Italian",
                              "description": "Type of selling point"
                            },
                            "allowedOrderTypes": {
                              "type": "array",
                              "description": "Codes array of allowed order types",
                              "items": {
                                "type": "string"
                              },
                              "example": [
                                "delivery",
                                "collection",
                                "insitu",
                                "reservation"
                              ]
                            }
                          }
                        },
                        "serviceConditions": {
                          "title": "Service",
                          "type": "object",
                          "description": "Service conditions",
                          "required": [
                            "acceptDiscounts",
                            "cartMinProductsAmount",
                            "allowedPaymentMethods"
                          ],
                          "properties": {
                            "acceptDiscounts": {
                              "type": "boolean",
                              "example": true,
                              "description": "True if discounts can be used in this service"
                            },
                            "cartMinProductsAmount": {
                              "type": "number",
                              "format": "float",
                              "example": "5",
                              "description": "Minimum cart amount"
                            },
                            "deliveryClientBasePrice": {
                              "type": "number",
                              "format": "float",
                              "example": "1.5",
                              "description": "Delivery base price"
                            },
                            "deliveryClientPerKmPrice": {
                              "type": "number",
                              "format": "float",
                              "example": "0",
                              "description": "Delivery price increment per kilometer"
                            },
                            "maxDeliveryDistance": {
                              "type": "number",
                              "format": "float",
                              "example": "5",
                              "description": "Maximum delivery distance"
                            },
                            "freeDeliveryMaxDistance": {
                              "type": "number",
                              "format": "float",
                              "example": "0",
                              "description": "Free delivery for orders with delivery distance lower than this"
                            },
                            "freeDeliveryMinAmount": {
                              "type": "number",
                              "format": "float",
                              "example": "20",
                              "description": "Free delivery for orders with amount higher than this"
                            },
                            "reservationMaxDiners": {
                              "type": "integer",
                              "format": "int64",
                              "example": null,
                              "description": "Maximum diners allowed for reservations"
                            },
                            "checkoutSelectionLabel": {
                              "type": "string",
                              "example": "Min. cart amount 5\u20ac. Max. delivery distance 5km. Delivery price 1.5\u20ac and free for orders over 20\u20ac",
                              "description": "Text describing all service properties"
                            },
                            "allowedPaymentMethods": {
                              "type": "array",
                              "description": "Allowed payment methods for this service",
                              "items": {
                                "title": "PaymentMethod",
                                "type": "object",
                                "required": [
                                  "id",
                                  "name",
                                  "code",
                                  "position"
                                ],
                                "properties": {
                                  "id": {
                                    "type": "integer",
                                    "format": "int64",
                                    "example": null,
                                    "description": "Payment method identifier"
                                  },
                                  "name": {
                                    "type": "string",
                                    "example": "Credit card online",
                                    "description": "Payment method name"
                                  },
                                  "code": {
                                    "type": "string",
                                    "example": "CREDIT_CARD_ONLINE",
                                    "description": "Payment method code"
                                  },
                                  "position": {
                                    "type": "integer",
                                    "format": "int64",
                                    "example": 1,
                                    "description": "Payment method position"
                                  }
                                }
                              },
                              "example": [
                                {
                                  "id": 2,
                                  "name": "Credit card online",
                                  "code": "CREDIT_CARD_ONLINE",
                                  "position": 1
                                },
                                {
                                  "id": 1,
                                  "name": "Cash",
                                  "code": "CASH_SELF_DRIVER",
                                  "position": 2
                                },
                                {
                                  "id": 4,
                                  "name": "Ticket Restaurant",
                                  "code": "EDENRED_SELF_DRIVER",
                                  "position": 3
                                }
                              ]
                            }
                          }
                        }
                      }
                    },
                    "validations": {
                      "title": "CheckoutValidation",
                      "description": "Checkout validations object",
                      "type": "object",
                      "required": [
                        "checkout",
                        "validations"
                      ],
                      "properties": {
                        "cartValidation": {
                          "title": "CartValidation",
                          "description": "Cart validation",
                          "type": "object",
                          "required": [
                            "amountAllowed",
                            "valid",
                            "errors"
                          ],
                          "properties": {
                            "amountAllowed": {
                              "type": "boolean",
                              "example": true,
                              "description": "True if amount is allowed to complete the order"
                            },
                            "errors": {
                              "type": "array",
                              "description": "Cart validation errors",
                              "items": {
                                "title": "Error",
                                "type": "object",
                                "required": [
                                  "code",
                                  "message",
                                  "number"
                                ],
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "example": "ORDER_TYPE_NOT_ALLOWED",
                                    "description": "Error code identifier"
                                  },
                                  "number": {
                                    "type": "integer",
                                    "format": "int64",
                                    "example": 4052,
                                    "description": "Error number identifier"
                                  },
                                  "message": {
                                    "type": "string",
                                    "example": "Order type is not allowed",
                                    "description": "Error message"
                                  }
                                }
                              }
                            },
                            "valid": {
                              "type": "boolean",
                              "example": true,
                              "description": "True if no cart errors found"
                            }
                          }
                        },
                        "discountValidation": {
                          "title": "DiscountValidation",
                          "description": "Discount validation",
                          "type": "object",
                          "required": [
                            "valid",
                            "errors"
                          ],
                          "properties": {
                            "errors": {
                              "type": "array",
                              "description": "Discount validation errors",
                              "items": {
                                "title": "Error",
                                "type": "object",
                                "required": [
                                  "code",
                                  "message",
                                  "number"
                                ],
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "example": "INVALID_DISCOUNT_DATES",
                                    "description": "Error code identifier"
                                  },
                                  "number": {
                                    "type": "integer",
                                    "format": "int64",
                                    "example": 4054,
                                    "description": "Error number identifier"
                                  },
                                  "message": {
                                    "type": "string",
                                    "example": "Invalid discount dates",
                                    "description": "Error message"
                                  }
                                }
                              }
                            },
                            "valid": {
                              "type": "boolean",
                              "example": true,
                              "description": "True if no discount errors found"
                            }
                          }
                        },
                        "paymentValidation": {
                          "title": "PaymentValidation",
                          "description": "Payment validation",
                          "type": "object",
                          "required": [
                            "valid",
                            "errors"
                          ],
                          "properties": {
                            "errors": {
                              "type": "array",
                              "description": "Payment validation errors",
                              "items": {
                                "title": "Error",
                                "type": "object",
                                "required": [
                                  "code",
                                  "message",
                                  "number"
                                ],
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "example": "PAYMENT_METHOD_NOT_FOUND",
                                    "description": "Error code identifier"
                                  },
                                  "number": {
                                    "type": "integer",
                                    "format": "int64",
                                    "example": 4047,
                                    "description": "Error number identifier"
                                  },
                                  "message": {
                                    "type": "string",
                                    "example": "Payment method not found",
                                    "description": "Error message"
                                  }
                                }
                              }
                            },
                            "valid": {
                              "type": "boolean",
                              "example": true,
                              "description": "True if no payment errors found"
                            }
                          }
                        },
                        "serviceValidation": {
                          "title": "ServiceValidation",
                          "description": "Service validation",
                          "type": "object",
                          "required": [
                            "valid",
                            "errors",
                            "validSelectedTime"
                          ],
                          "properties": {
                            "errors": {
                              "type": "array",
                              "description": "Service validation errors",
                              "items": {
                                "title": "Error",
                                "type": "object",
                                "required": [
                                  "code",
                                  "message",
                                  "number"
                                ],
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "example": "WRONG_SELECTED_TIME",
                                    "description": "Error code identifier"
                                  },
                                  "number": {
                                    "type": "integer",
                                    "format": "int64",
                                    "example": 4051,
                                    "description": "Error number identifier"
                                  },
                                  "message": {
                                    "type": "string",
                                    "example": "Wrong selected time",
                                    "description": "Error message"
                                  }
                                }
                              }
                            },
                            "valid": {
                              "type": "boolean",
                              "example": true,
                              "description": "True if no service errors found"
                            },
                            "validSelectedTime": {
                              "type": "boolean",
                              "example": true,
                              "description": "True if selected time is allowed to complete the order"
                            }
                          }
                        },
                        "readyForCreateOrder": {
                          "type": "boolean",
                          "example": true,
                          "description": "True if checkout is ready to complete the order"
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": {
                      "checkout": {
                        "address": {
                          "id": 1003,
                          "street": "C/ Example, 23",
                          "details": "Canada building",
                          "city": "City name",
                          "province": "Province name",
                          "postalCode": "12345",
                          "latitude": "41.308166",
                          "longitude": "2.019725",
                          "googlePlaceId": "xxxxxxxxxxxx",
                          "placeName": "C/ Example, 23, City name"
                        },
                        "cartAmount": 21,
                        "comment": "Thank you",
                        "consumer": {
                          "id": "1003",
                          "email": "john@example.com",
                          "name": "John",
                          "lastname": "Doe",
                          "image": "https://cdn.sinqro.com/assets/images/placeholder_image.jpg",
                          "phone": "+34600000000",
                          "account": {
                            "id": "43",
                            "name": "My account"
                          }
                        },
                        "couponCode": "discount20",
                        "deliveryAmount": "1.50",
                        "deliveryDistance": "1.10",
                        "discountAmount": "4.20",
                        "discountLabel": "20% of discount",
                        "executionTime": "2017-10-12T10:10:00+0000",
                        "items": [
                          {
                            "comment": "",
                            "name": "Margherita",
                            "image": "http://mycdn.com/item-image.jpeg",
                            "quantity": "2",
                            "totalPrice": "21",
                            "unitAdditionalPrice": "1.50",
                            "unitFinalPrice": "10.50",
                            "unitPrice": "9",
                            "type": "product",
                            "items": [
                              {
                                "comment": "",
                                "name": "Pepperoni",
                                "image": "http://mycdn.com/item-image.jpeg",
                                "quantity": "1",
                                "totalPrice": "1.50",
                                "unitAdditionalPrice": "0",
                                "unitFinalPrice": "1.50",
                                "unitPrice": "1.50",
                                "type": "product-option",
                                "items": [
                                  []
                                ]
                              }
                            ]
                          }
                        ],
                        "orderTotal": "18.30",
                        "orderType": "delivery",
                        "payments": [
                          {
                            "amount": 18.3,
                            "methodCode": "CREDIT_CARD_ONLINE"
                          }
                        ],
                        "sellingPoint": {
                          "id": 3442,
                          "name": "My restaurant",
                          "address": {
                            "id": 1003,
                            "street": "C/ Example, 23",
                            "details": "Canada building",
                            "city": "City name",
                            "province": "Province name",
                            "postalCode": "12345",
                            "latitude": "41.308166",
                            "longitude": "2.019725",
                            "googlePlaceId": "xxxxxxxxxxxx",
                            "placeName": "C/ Example, 23, City name"
                          },
                          "phone": "+34600000000",
                          "email": "myrestaurant@example.com",
                          "logo": "http://mycdn.com/selling-point-logo.jpeg",
                          "mainImage": "http://mycdn.com/selling-point-main-image.jpeg",
                          "description": "This restaurant...",
                          "urlKey": "restaurant-name-city",
                          "type": "Italian",
                          "allowedOrderTypes": [
                            "delivery",
                            "collection",
                            "insitu",
                            "reservation"
                          ]
                        },
                        "serviceConditions": {
                          "acceptDiscounts": true,
                          "cartMinProductsAmount": "5",
                          "deliveryClientBasePrice": "1.5",
                          "deliveryClientPerKmPrice": "0",
                          "maxDeliveryDistance": "5",
                          "freeDeliveryMaxDistance": "0",
                          "freeDeliveryMinAmount": "20",
                          "checkoutSelectionLabel": "Min. cart amount 5\u20ac. Max. delivery distance 5km. Delivery price 1.5\u20ac and free for orders over 20\u20ac",
                          "allowedPaymentMethods": [
                            {
                              "id": 2,
                              "name": "Credit card online",
                              "code": "CREDIT_CARD_ONLINE",
                              "position": 1
                            },
                            {
                              "id": 1,
                              "name": "Cash",
                              "code": "CASH_SELF_DRIVER",
                              "position": 2
                            },
                            {
                              "id": 4,
                              "name": "Ticket Restaurant",
                              "code": "EDENRED_SELF_DRIVER",
                              "position": 3
                            }
                          ]
                        }
                      },
                      "validations": {
                        "cartValidation": {
                          "amountAllowed": true,
                          "errors": [
                            {
                              "code": "ORDER_TYPE_NOT_ALLOWED",
                              "number": 4052,
                              "message": "Order type is not allowed"
                            }
                          ],
                          "valid": true
                        },
                        "discountValidation": {
                          "errors": [
                            {
                              "code": "INVALID_DISCOUNT_DATES",
                              "number": 4054,
                              "message": "Invalid discount dates"
                            }
                          ],
                          "valid": true
                        },
                        "paymentValidation": {
                          "errors": [
                            {
                              "code": "PAYMENT_METHOD_NOT_FOUND",
                              "number": 4047,
                              "message": "Payment method not found"
                            }
                          ],
                          "valid": true
                        },
                        "serviceValidation": {
                          "errors": [
                            {
                              "code": "WRONG_SELECTED_TIME",
                              "number": 4051,
                              "message": "Wrong selected time"
                            }
                          ],
                          "valid": true,
                          "validSelectedTime": true
                        },
                        "readyForCreateOrder": true
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Order"
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/postOrderValidationParameters"
        }
      }
    },
    "/consumers/{consumerId}/orders": {
      "post": {
        "summary": "Post order",
        "description": "Create new order",
        "operationId": "postConsumerOrder",
        "parameters": [
          {
            "name": "consumerId",
            "in": "path",
            "description": "Consumer identifier",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Order",
                  "description": "",
                  "type": "object",
                  "required": [
                    "id",
                    "totalAmount",
                    "executionTimeLabel",
                    "executionTime",
                    "consumer",
                    "status",
                    "type",
                    "sellingPoint",
                    "payments",
                    "orderLines"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer",
                      "format": "int64",
                      "example": 4912,
                      "description": "Order identifier"
                    },
                    "totalAmount": {
                      "type": "number",
                      "format": "float",
                      "example": "29.90",
                      "description": "Total order amount"
                    },
                    "executionTimeLabel": {
                      "type": "string",
                      "example": "11/10 at 13:10h",
                      "description": "Short text representing order execution time"
                    },
                    "executionTime": {
                      "type": "string",
                      "example": "2017-10-11T13:10:00+0000",
                      "description": "Order execution time"
                    },
                    "comment": {
                      "type": "string",
                      "example": "Thank you",
                      "description": "Consumer order comment"
                    },
                    "cancellationComment": {
                      "type": "string",
                      "example": "",
                      "description": "Only if order is cancelled"
                    },
                    "consumer": {
                      "title": "Consumer",
                      "description": "",
                      "type": "object",
                      "required": [
                        "id",
                        "name",
                        "email"
                      ],
                      "properties": {
                        "id": {
                          "type": "integer",
                          "format": "int64",
                          "example": "1003",
                          "description": "Consumer identifier"
                        },
                        "email": {
                          "type": "string",
                          "example": "john@example.com",
                          "description": "Consumer email"
                        },
                        "name": {
                          "type": "string",
                          "example": "John",
                          "description": "Consumer name"
                        },
                        "lastname": {
                          "type": "string",
                          "example": "Doe",
                          "description": "Consumer last name"
                        },
                        "image": {
                          "type": "string",
                          "example": "https://cdn.sinqro.com/assets/images/placeholder_image.jpg",
                          "description": "Consumer profile image url"
                        },
                        "phone": {
                          "type": "string",
                          "example": "+34600000000",
                          "description": "In international format. Ex. +34600000000"
                        }
                      }
                    },
                    "status": {
                      "title": "OrderStatus",
                      "type": "object",
                      "description": "Order current status",
                      "required": [
                        "code",
                        "name",
                        "color"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "waiting_sp_validation",
                          "description": "Status identifier code",
                          "enum": [
                            "waiting_sp_validation",
                            "accepted",
                            "preparation",
                            "ready",
                            "delivering",
                            "delivered",
                            "incident",
                            "cancelled",
                            "finished",
                            "reservation_accepted",
                            "cancelled_by_sp",
                            "cancelled_by_client",
                            "cancelled_by_driver",
                            "cancelled_by_team",
                            "payment_authorisation_failed"
                          ]
                        },
                        "name": {
                          "type": "string",
                          "example": "Waiting selling point validation",
                          "description": "Status name"
                        },
                        "color": {
                          "type": "string",
                          "example": "#f7981d",
                          "description": "Status color"
                        },
                        "callToAction": {
                          "type": "string",
                          "example": "",
                          "description": "Call to action if is needed"
                        },
                        "isFinalStatus": {
                          "type": "boolean",
                          "example": false,
                          "description": "Return if status is final status and doesn't require interaction"
                        },
                        "globalStatusCode": {
                          "type": "string",
                          "example": "processing",
                          "description": "Order global status identifier code"
                        }
                      }
                    },
                    "type": {
                      "type": "string",
                      "example": "delivery",
                      "description": "Order type code",
                      "enum": [
                        "delivery",
                        "collection",
                        "insitu",
                        "reservation"
                      ]
                    },
                    "sellingPoint": {
                      "title": "SellingPoint",
                      "type": "object",
                      "required": [
                        "id",
                        "name",
                        "address"
                      ],
                      "description": "Selling point data",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "format": "int64",
                          "example": 3442,
                          "description": "Selling point identifier"
                        },
                        "name": {
                          "type": "string",
                          "example": "My restaurant",
                          "description": "Selling point name"
                        },
                        "address": {
                          "title": "Address",
                          "type": "object",
                          "required": [
                            "id",
                            "street"
                          ],
                          "description": "Selling point address",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "format": "int64",
                              "example": 1003,
                              "description": "Address identifier"
                            },
                            "street": {
                              "type": "string",
                              "example": "C/ Example, 23",
                              "description": "Address street with number"
                            },
                            "details": {
                              "type": "string",
                              "example": "Canada building",
                              "description": "Extra address information"
                            },
                            "city": {
                              "type": "string",
                              "example": "City name",
                              "description": "Address city name"
                            },
                            "province": {
                              "type": "string",
                              "example": "Province name",
                              "description": "Address province name"
                            },
                            "postalCode": {
                              "type": "string",
                              "example": "12345",
                              "description": "Address postal code"
                            },
                            "latitude": {
                              "type": "string",
                              "example": "41.308166",
                              "description": "Address latitude"
                            },
                            "longitude": {
                              "type": "string",
                              "example": "2.019725",
                              "description": "Address longitude"
                            },
                            "googlePlaceId": {
                              "type": "string",
                              "example": "xxxxxxxxxxxx",
                              "description": "Google place identifier"
                            },
                            "placeName": {
                              "type": "string",
                              "example": "C/ Example, 23, City name",
                              "description": "Place name"
                            }
                          }
                        },
                        "phone": {
                          "type": "string",
                          "example": "+34600000000",
                          "description": "Selling point phone"
                        },
                        "email": {
                          "type": "string",
                          "example": "myrestaurant@example.com",
                          "description": "Selling point contact email"
                        },
                        "logo": {
                          "type": "string",
                          "example": "http://mycdn.com/selling-point-logo.jpeg",
                          "description": "Selling point logo url"
                        },
                        "mainImage": {
                          "type": "string",
                          "example": "http://mycdn.com/selling-point-main-image.jpeg",
                          "description": "Selling point main image"
                        },
                        "description": {
                          "type": "string",
                          "example": "This restaurant...",
                          "description": "Selling point description"
                        },
                        "urlKey": {
                          "type": "string",
                          "example": "restaurant-name-city",
                          "description": "Encoded name for url"
                        },
                        "type": {
                          "type": "string",
                          "example": "Italian",
                          "description": "Type of selling point"
                        },
                        "allowedOrderTypes": {
                          "type": "array",
                          "description": "Codes array of allowed order types",
                          "items": {
                            "type": "string"
                          },
                          "example": [
                            "delivery",
                            "collection",
                            "insitu",
                            "reservation"
                          ]
                        }
                      }
                    },
                    "payments": {
                      "type": "array",
                      "description": "Order payments",
                      "items": {
                        "title": "Order",
                        "description": "",
                        "type": "object",
                        "required": [
                          "id",
                          "amount",
                          "paymentMethodName"
                        ],
                        "properties": {
                          "id": {
                            "type": "integer",
                            "format": "int64",
                            "example": 5922,
                            "description": "Order payment identifier"
                          },
                          "amount": {
                            "type": "number",
                            "format": "float",
                            "example": 29.9,
                            "description": "Payment amount"
                          },
                          "paymentMethodName": {
                            "type": "string",
                            "example": "Credit card",
                            "description": "Payment method name"
                          }
                        }
                      }
                    },
                    "orderLines": {
                      "type": "array",
                      "description": "Order items",
                      "items": {
                        "title": "OrderLine",
                        "description": "",
                        "type": "object",
                        "required": [
                          "id",
                          "totalAmount",
                          "unitPrice",
                          "quantity",
                          "label",
                          "type"
                        ],
                        "properties": {
                          "id": {
                            "type": "integer",
                            "format": "int64",
                            "description": "Order line identifier",
                            "example": 8822
                          },
                          "totalAmount": {
                            "type": "number",
                            "format": "float",
                            "description": "Order line total amount",
                            "example": 29.9
                          },
                          "unitPrice": {
                            "type": "number",
                            "format": "float",
                            "description": "Order line total amount",
                            "example": 14.95
                          },
                          "quantity": {
                            "type": "integer",
                            "format": "int64",
                            "description": "Order line quantity",
                            "example": 2
                          },
                          "comment": {
                            "type": "string",
                            "description": "Order line comment",
                            "example": ""
                          },
                          "label": {
                            "type": "string",
                            "description": "Order line label",
                            "example": "Pizza margherita"
                          },
                          "type": {
                            "type": "string",
                            "description": "Order type code",
                            "enum": [
                              "PRODUCT",
                              "MENU",
                              "PRODUCT_OPTIONS",
                              "DISCOUNT",
                              "DELIVERY",
                              "CUSTOM",
                              "POS_ITEM"
                            ],
                            "example": "PRODUCT"
                          },
                          "childrenOrderLines": {
                            "type": "array",
                            "description": "Children order lines",
                            "items": {
                              "type": "object"
                            }
                          }
                        }
                      }
                    },
                    "deliveryAmount": {
                      "type": "number",
                      "format": "float",
                      "example": 1,
                      "description": "Delivery amount. Only for delivery orders."
                    },
                    "deliveryAddress": {
                      "title": "Delivery order address. Only for delivery orders",
                      "type": "object",
                      "required": [
                        "id",
                        "street"
                      ],
                      "description": "",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "format": "int64",
                          "example": 1003,
                          "description": "Address identifier"
                        },
                        "street": {
                          "type": "string",
                          "example": "C/ Example, 23",
                          "description": "Address street with number"
                        },
                        "details": {
                          "type": "string",
                          "example": "Canada building",
                          "description": "Extra address information"
                        },
                        "city": {
                          "type": "string",
                          "example": "City name",
                          "description": "Address city name"
                        },
                        "province": {
                          "type": "string",
                          "example": "Province name",
                          "description": "Address province name"
                        },
                        "postalCode": {
                          "type": "string",
                          "example": "12345",
                          "description": "Address postal code"
                        },
                        "latitude": {
                          "type": "string",
                          "example": "41.308166",
                          "description": "Address latitude"
                        },
                        "longitude": {
                          "type": "string",
                          "example": "2.019725",
                          "description": "Address longitude"
                        },
                        "googlePlaceId": {
                          "type": "string",
                          "example": "xxxxxxxxxxxx",
                          "description": "Google place identifier"
                        },
                        "placeName": {
                          "type": "string",
                          "example": "C/ Example, 23, City name",
                          "description": "Place name"
                        }
                      }
                    },
                    "dinersNumber": {
                      "type": "integer",
                      "format": "int64",
                      "example": 6,
                      "description": "Number of diners. Only for reservations."
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": {
                      "id": 4912,
                      "totalAmount": "29.90",
                      "executionTimeLabel": "11/10 at 13:10h",
                      "executionTime": "2017-10-11T13:10:00+0000",
                      "comment": "Thank you",
                      "cancellationComment": "",
                      "consumer": {
                        "id": "1003",
                        "email": "john@example.com",
                        "name": "John",
                        "lastname": "Doe",
                        "image": "https://cdn.sinqro.com/assets/images/placeholder_image.jpg",
                        "phone": "+34600000000"
                      },
                      "status": {
                        "code": "waiting_sp_validation",
                        "name": "Waiting selling point validation",
                        "color": "#f7981d",
                        "callToAction": "",
                        "isFinalStatus": false,
                        "globalStatusCode": "processing"
                      },
                      "type": "delivery",
                      "sellingPoint": {
                        "id": 3442,
                        "name": "My restaurant",
                        "address": {
                          "id": 1003,
                          "street": "C/ Example, 23",
                          "details": "Canada building",
                          "city": "City name",
                          "province": "Province name",
                          "postalCode": "12345",
                          "latitude": "41.308166",
                          "longitude": "2.019725",
                          "googlePlaceId": "xxxxxxxxxxxx",
                          "placeName": "C/ Example, 23, City name"
                        },
                        "phone": "+34600000000",
                        "email": "myrestaurant@example.com",
                        "logo": "http://mycdn.com/selling-point-logo.jpeg",
                        "mainImage": "http://mycdn.com/selling-point-main-image.jpeg",
                        "description": "This restaurant...",
                        "urlKey": "restaurant-name-city",
                        "type": "Italian",
                        "allowedOrderTypes": [
                          "delivery",
                          "collection",
                          "insitu",
                          "reservation"
                        ]
                      },
                      "payments": [
                        {
                          "id": 5922,
                          "amount": 29.9,
                          "paymentMethodName": "Credit card"
                        }
                      ],
                      "orderLines": [
                        {
                          "id": 8822,
                          "totalAmount": 29.9,
                          "unitPrice": 14.95,
                          "quantity": 2,
                          "comment": "",
                          "label": "Pizza margherita",
                          "type": "PRODUCT",
                          "childrenOrderLines": [
                            []
                          ]
                        }
                      ],
                      "deliveryAmount": 1,
                      "deliveryAddress": {
                        "id": 1003,
                        "street": "C/ Example, 23",
                        "details": "Canada building",
                        "city": "City name",
                        "province": "Province name",
                        "postalCode": "12345",
                        "latitude": "41.308166",
                        "longitude": "2.019725",
                        "googlePlaceId": "xxxxxxxxxxxx",
                        "placeName": "C/ Example, 23, City name"
                      },
                      "dinersNumber": 6
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Order"
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/postOrderValidationParameters"
        }
      },
      "get": {
        "summary": "Get orders",
        "description": "Get consumer orders",
        "operationId": "getConsumerOrders",
        "parameters": [
          {
            "name": "consumerId",
            "in": "path",
            "description": "Consumer identifier",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "title": "Order",
                    "description": "",
                    "type": "object",
                    "required": [
                      "id",
                      "totalAmount",
                      "executionTimeLabel",
                      "executionTime",
                      "consumer",
                      "status",
                      "type",
                      "sellingPoint",
                      "payments",
                      "orderLines"
                    ],
                    "properties": {
                      "id": {
                        "type": "integer",
                        "format": "int64",
                        "example": 4912,
                        "description": "Order identifier"
                      },
                      "totalAmount": {
                        "type": "number",
                        "format": "float",
                        "example": "29.90",
                        "description": "Total order amount"
                      },
                      "executionTimeLabel": {
                        "type": "string",
                        "example": "11/10 at 13:10h",
                        "description": "Short text representing order execution time"
                      },
                      "executionTime": {
                        "type": "string",
                        "example": "2017-10-11T13:10:00+0000",
                        "description": "Order execution time"
                      },
                      "comment": {
                        "type": "string",
                        "example": "Thank you",
                        "description": "Consumer order comment"
                      },
                      "cancellationComment": {
                        "type": "string",
                        "example": "",
                        "description": "Only if order is cancelled"
                      },
                      "consumer": {
                        "title": "Consumer",
                        "description": "",
                        "type": "object",
                        "required": [
                          "id",
                          "name",
                          "email"
                        ],
                        "properties": {
                          "id": {
                            "type": "integer",
                            "format": "int64",
                            "example": "1003",
                            "description": "Consumer identifier"
                          },
                          "email": {
                            "type": "string",
                            "example": "john@example.com",
                            "description": "Consumer email"
                          },
                          "name": {
                            "type": "string",
                            "example": "John",
                            "description": "Consumer name"
                          },
                          "lastname": {
                            "type": "string",
                            "example": "Doe",
                            "description": "Consumer last name"
                          },
                          "image": {
                            "type": "string",
                            "example": "https://cdn.sinqro.com/assets/images/placeholder_image.jpg",
                            "description": "Consumer profile image url"
                          },
                          "phone": {
                            "type": "string",
                            "example": "+34600000000",
                            "description": "In international format. Ex. +34600000000"
                          }
                        }
                      },
                      "status": {
                        "title": "OrderStatus",
                        "type": "object",
                        "description": "Order current status",
                        "required": [
                          "code",
                          "name",
                          "color"
                        ],
                        "properties": {
                          "code": {
                            "type": "string",
                            "example": "waiting_sp_validation",
                            "description": "Status identifier code",
                            "enum": [
                              "waiting_sp_validation",
                              "accepted",
                              "preparation",
                              "ready",
                              "delivering",
                              "delivered",
                              "incident",
                              "cancelled",
                              "finished",
                              "reservation_accepted",
                              "cancelled_by_sp",
                              "cancelled_by_client",
                              "cancelled_by_driver",
                              "cancelled_by_team",
                              "payment_authorisation_failed"
                            ]
                          },
                          "name": {
                            "type": "string",
                            "example": "Waiting selling point validation",
                            "description": "Status name"
                          },
                          "color": {
                            "type": "string",
                            "example": "#f7981d",
                            "description": "Status color"
                          },
                          "callToAction": {
                            "type": "string",
                            "example": "",
                            "description": "Call to action if is needed"
                          },
                          "isFinalStatus": {
                            "type": "boolean",
                            "example": false,
                            "description": "Return if status is final status and doesn't require interaction"
                          },
                          "globalStatusCode": {
                            "type": "string",
                            "example": "processing",
                            "description": "Order global status identifier code"
                          }
                        }
                      },
                      "type": {
                        "type": "string",
                        "example": "delivery",
                        "description": "Order type code",
                        "enum": [
                          "delivery",
                          "collection",
                          "insitu",
                          "reservation"
                        ]
                      },
                      "sellingPoint": {
                        "title": "SellingPoint",
                        "type": "object",
                        "required": [
                          "id",
                          "name",
                          "address"
                        ],
                        "description": "Selling point data",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "format": "int64",
                            "example": 3442,
                            "description": "Selling point identifier"
                          },
                          "name": {
                            "type": "string",
                            "example": "My restaurant",
                            "description": "Selling point name"
                          },
                          "address": {
                            "title": "Address",
                            "type": "object",
                            "required": [
                              "id",
                              "street"
                            ],
                            "description": "Selling point address",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "format": "int64",
                                "example": 1003,
                                "description": "Address identifier"
                              },
                              "street": {
                                "type": "string",
                                "example": "C/ Example, 23",
                                "description": "Address street with number"
                              },
                              "details": {
                                "type": "string",
                                "example": "Canada building",
                                "description": "Extra address information"
                              },
                              "city": {
                                "type": "string",
                                "example": "City name",
                                "description": "Address city name"
                              },
                              "province": {
                                "type": "string",
                                "example": "Province name",
                                "description": "Address province name"
                              },
                              "postalCode": {
                                "type": "string",
                                "example": "12345",
                                "description": "Address postal code"
                              },
                              "latitude": {
                                "type": "string",
                                "example": "41.308166",
                                "description": "Address latitude"
                              },
                              "longitude": {
                                "type": "string",
                                "example": "2.019725",
                                "description": "Address longitude"
                              },
                              "googlePlaceId": {
                                "type": "string",
                                "example": "xxxxxxxxxxxx",
                                "description": "Google place identifier"
                              },
                              "placeName": {
                                "type": "string",
                                "example": "C/ Example, 23, City name",
                                "description": "Place name"
                              }
                            }
                          },
                          "phone": {
                            "type": "string",
                            "example": "+34600000000",
                            "description": "Selling point phone"
                          },
                          "email": {
                            "type": "string",
                            "example": "myrestaurant@example.com",
                            "description": "Selling point contact email"
                          },
                          "logo": {
                            "type": "string",
                            "example": "http://mycdn.com/selling-point-logo.jpeg",
                            "description": "Selling point logo url"
                          },
                          "mainImage": {
                            "type": "string",
                            "example": "http://mycdn.com/selling-point-main-image.jpeg",
                            "description": "Selling point main image"
                          },
                          "description": {
                            "type": "string",
                            "example": "This restaurant...",
                            "description": "Selling point description"
                          },
                          "urlKey": {
                            "type": "string",
                            "example": "restaurant-name-city",
                            "description": "Encoded name for url"
                          },
                          "type": {
                            "type": "string",
                            "example": "Italian",
                            "description": "Type of selling point"
                          },
                          "allowedOrderTypes": {
                            "type": "array",
                            "description": "Codes array of allowed order types",
                            "items": {
                              "type": "string"
                            },
                            "example": [
                              "delivery",
                              "collection",
                              "insitu",
                              "reservation"
                            ]
                          }
                        }
                      },
                      "payments": {
                        "type": "array",
                        "description": "Order payments",
                        "items": {
                          "title": "Order",
                          "description": "",
                          "type": "object",
                          "required": [
                            "id",
                            "amount",
                            "paymentMethodName"
                          ],
                          "properties": {
                            "id": {
                              "type": "integer",
                              "format": "int64",
                              "example": 5922,
                              "description": "Order payment identifier"
                            },
                            "amount": {
                              "type": "number",
                              "format": "float",
                              "example": 29.9,
                              "description": "Payment amount"
                            },
                            "paymentMethodName": {
                              "type": "string",
                              "example": "Credit card",
                              "description": "Payment method name"
                            }
                          }
                        }
                      },
                      "orderLines": {
                        "type": "array",
                        "description": "Order items",
                        "items": {
                          "title": "OrderLine",
                          "description": "",
                          "type": "object",
                          "required": [
                            "id",
                            "totalAmount",
                            "unitPrice",
                            "quantity",
                            "label",
                            "type"
                          ],
                          "properties": {
                            "id": {
                              "type": "integer",
                              "format": "int64",
                              "description": "Order line identifier",
                              "example": 8822
                            },
                            "totalAmount": {
                              "type": "number",
                              "format": "float",
                              "description": "Order line total amount",
                              "example": 29.9
                            },
                            "unitPrice": {
                              "type": "number",
                              "format": "float",
                              "description": "Order line total amount",
                              "example": 14.95
                            },
                            "quantity": {
                              "type": "integer",
                              "format": "int64",
                              "description": "Order line quantity",
                              "example": 2
                            },
                            "comment": {
                              "type": "string",
                              "description": "Order line comment",
                              "example": ""
                            },
                            "label": {
                              "type": "string",
                              "description": "Order line label",
                              "example": "Pizza margherita"
                            },
                            "type": {
                              "type": "string",
                              "description": "Order type code",
                              "enum": [
                                "PRODUCT",
                                "MENU",
                                "PRODUCT_OPTIONS",
                                "DISCOUNT",
                                "DELIVERY",
                                "CUSTOM",
                                "POS_ITEM"
                              ],
                              "example": "PRODUCT"
                            },
                            "childrenOrderLines": {
                              "type": "array",
                              "description": "Children order lines",
                              "items": {
                                "type": "object"
                              }
                            }
                          }
                        }
                      },
                      "deliveryAmount": {
                        "type": "number",
                        "format": "float",
                        "example": 1,
                        "description": "Delivery amount. Only for delivery orders."
                      },
                      "deliveryAddress": {
                        "title": "Delivery order address. Only for delivery orders",
                        "type": "object",
                        "required": [
                          "id",
                          "street"
                        ],
                        "description": "",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "format": "int64",
                            "example": 1003,
                            "description": "Address identifier"
                          },
                          "street": {
                            "type": "string",
                            "example": "C/ Example, 23",
                            "description": "Address street with number"
                          },
                          "details": {
                            "type": "string",
                            "example": "Canada building",
                            "description": "Extra address information"
                          },
                          "city": {
                            "type": "string",
                            "example": "City name",
                            "description": "Address city name"
                          },
                          "province": {
                            "type": "string",
                            "example": "Province name",
                            "description": "Address province name"
                          },
                          "postalCode": {
                            "type": "string",
                            "example": "12345",
                            "description": "Address postal code"
                          },
                          "latitude": {
                            "type": "string",
                            "example": "41.308166",
                            "description": "Address latitude"
                          },
                          "longitude": {
                            "type": "string",
                            "example": "2.019725",
                            "description": "Address longitude"
                          },
                          "googlePlaceId": {
                            "type": "string",
                            "example": "xxxxxxxxxxxx",
                            "description": "Google place identifier"
                          },
                          "placeName": {
                            "type": "string",
                            "example": "C/ Example, 23, City name",
                            "description": "Place name"
                          }
                        }
                      },
                      "dinersNumber": {
                        "type": "integer",
                        "format": "int64",
                        "example": 6,
                        "description": "Number of diners. Only for reservations."
                      }
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": [
                      {
                        "id": 4912,
                        "totalAmount": "29.90",
                        "executionTimeLabel": "11/10 at 13:10h",
                        "executionTime": "2017-10-11T13:10:00+0000",
                        "comment": "Thank you",
                        "cancellationComment": "",
                        "consumer": {
                          "id": "1003",
                          "email": "john@example.com",
                          "name": "John",
                          "lastname": "Doe",
                          "image": "https://cdn.sinqro.com/assets/images/placeholder_image.jpg",
                          "phone": "+34600000000"
                        },
                        "status": {
                          "code": "waiting_sp_validation",
                          "name": "Waiting selling point validation",
                          "color": "#f7981d",
                          "callToAction": "",
                          "isFinalStatus": false,
                          "globalStatusCode": "processing"
                        },
                        "type": "delivery",
                        "sellingPoint": {
                          "id": 3442,
                          "name": "My restaurant",
                          "address": {
                            "id": 1003,
                            "street": "C/ Example, 23",
                            "details": "Canada building",
                            "city": "City name",
                            "province": "Province name",
                            "postalCode": "12345",
                            "latitude": "41.308166",
                            "longitude": "2.019725",
                            "googlePlaceId": "xxxxxxxxxxxx",
                            "placeName": "C/ Example, 23, City name"
                          },
                          "phone": "+34600000000",
                          "email": "myrestaurant@example.com",
                          "logo": "http://mycdn.com/selling-point-logo.jpeg",
                          "mainImage": "http://mycdn.com/selling-point-main-image.jpeg",
                          "description": "This restaurant...",
                          "urlKey": "restaurant-name-city",
                          "type": "Italian",
                          "allowedOrderTypes": [
                            "delivery",
                            "collection",
                            "insitu",
                            "reservation"
                          ]
                        },
                        "payments": [
                          {
                            "id": 5922,
                            "amount": 29.9,
                            "paymentMethodName": "Credit card"
                          }
                        ],
                        "orderLines": [
                          {
                            "id": 8822,
                            "totalAmount": 29.9,
                            "unitPrice": 14.95,
                            "quantity": 2,
                            "comment": "",
                            "label": "Pizza margherita",
                            "type": "PRODUCT",
                            "childrenOrderLines": [
                              []
                            ]
                          }
                        ],
                        "deliveryAmount": 1,
                        "deliveryAddress": {
                          "id": 1003,
                          "street": "C/ Example, 23",
                          "details": "Canada building",
                          "city": "City name",
                          "province": "Province name",
                          "postalCode": "12345",
                          "latitude": "41.308166",
                          "longitude": "2.019725",
                          "googlePlaceId": "xxxxxxxxxxxx",
                          "placeName": "C/ Example, 23, City name"
                        },
                        "dinersNumber": 6
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Order"
        ]
      }
    },
    "/consumers/{consumerId}/orders/{orderId}": {
      "get": {
        "summary": "Get order",
        "description": "Get consumer order by identifier",
        "operationId": "getConsumerOrder",
        "parameters": [
          {
            "name": "consumerId",
            "in": "path",
            "description": "Consumer identifier",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "orderId",
            "in": "path",
            "description": "Order identifier",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Order",
                  "description": "",
                  "type": "object",
                  "required": [
                    "id",
                    "totalAmount",
                    "executionTimeLabel",
                    "executionTime",
                    "consumer",
                    "status",
                    "type",
                    "sellingPoint",
                    "payments",
                    "orderLines"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer",
                      "format": "int64",
                      "example": 4912,
                      "description": "Order identifier"
                    },
                    "totalAmount": {
                      "type": "number",
                      "format": "float",
                      "example": "29.90",
                      "description": "Total order amount"
                    },
                    "executionTimeLabel": {
                      "type": "string",
                      "example": "11/10 at 13:10h",
                      "description": "Short text representing order execution time"
                    },
                    "executionTime": {
                      "type": "string",
                      "example": "2017-10-11T13:10:00+0000",
                      "description": "Order execution time"
                    },
                    "comment": {
                      "type": "string",
                      "example": "Thank you",
                      "description": "Consumer order comment"
                    },
                    "cancellationComment": {
                      "type": "string",
                      "example": "",
                      "description": "Only if order is cancelled"
                    },
                    "consumer": {
                      "title": "Consumer",
                      "description": "",
                      "type": "object",
                      "required": [
                        "id",
                        "name",
                        "email"
                      ],
                      "properties": {
                        "id": {
                          "type": "integer",
                          "format": "int64",
                          "example": "1003",
                          "description": "Consumer identifier"
                        },
                        "email": {
                          "type": "string",
                          "example": "john@example.com",
                          "description": "Consumer email"
                        },
                        "name": {
                          "type": "string",
                          "example": "John",
                          "description": "Consumer name"
                        },
                        "lastname": {
                          "type": "string",
                          "example": "Doe",
                          "description": "Consumer last name"
                        },
                        "image": {
                          "type": "string",
                          "example": "https://cdn.sinqro.com/assets/images/placeholder_image.jpg",
                          "description": "Consumer profile image url"
                        },
                        "phone": {
                          "type": "string",
                          "example": "+34600000000",
                          "description": "In international format. Ex. +34600000000"
                        }
                      }
                    },
                    "status": {
                      "title": "OrderStatus",
                      "type": "object",
                      "description": "Order current status",
                      "required": [
                        "code",
                        "name",
                        "color"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "waiting_sp_validation",
                          "description": "Status identifier code",
                          "enum": [
                            "waiting_sp_validation",
                            "accepted",
                            "preparation",
                            "ready",
                            "delivering",
                            "delivered",
                            "incident",
                            "cancelled",
                            "finished",
                            "reservation_accepted",
                            "cancelled_by_sp",
                            "cancelled_by_client",
                            "cancelled_by_driver",
                            "cancelled_by_team",
                            "payment_authorisation_failed"
                          ]
                        },
                        "name": {
                          "type": "string",
                          "example": "Waiting selling point validation",
                          "description": "Status name"
                        },
                        "color": {
                          "type": "string",
                          "example": "#f7981d",
                          "description": "Status color"
                        },
                        "callToAction": {
                          "type": "string",
                          "example": "",
                          "description": "Call to action if is needed"
                        },
                        "isFinalStatus": {
                          "type": "boolean",
                          "example": false,
                          "description": "Return if status is final status and doesn't require interaction"
                        },
                        "globalStatusCode": {
                          "type": "string",
                          "example": "processing",
                          "description": "Order global status identifier code"
                        }
                      }
                    },
                    "type": {
                      "type": "string",
                      "example": "delivery",
                      "description": "Order type code",
                      "enum": [
                        "delivery",
                        "collection",
                        "insitu",
                        "reservation"
                      ]
                    },
                    "sellingPoint": {
                      "title": "SellingPoint",
                      "type": "object",
                      "required": [
                        "id",
                        "name",
                        "address"
                      ],
                      "description": "Selling point data",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "format": "int64",
                          "example": 3442,
                          "description": "Selling point identifier"
                        },
                        "name": {
                          "type": "string",
                          "example": "My restaurant",
                          "description": "Selling point name"
                        },
                        "address": {
                          "title": "Address",
                          "type": "object",
                          "required": [
                            "id",
                            "street"
                          ],
                          "description": "Selling point address",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "format": "int64",
                              "example": 1003,
                              "description": "Address identifier"
                            },
                            "street": {
                              "type": "string",
                              "example": "C/ Example, 23",
                              "description": "Address street with number"
                            },
                            "details": {
                              "type": "string",
                              "example": "Canada building",
                              "description": "Extra address information"
                            },
                            "city": {
                              "type": "string",
                              "example": "City name",
                              "description": "Address city name"
                            },
                            "province": {
                              "type": "string",
                              "example": "Province name",
                              "description": "Address province name"
                            },
                            "postalCode": {
                              "type": "string",
                              "example": "12345",
                              "description": "Address postal code"
                            },
                            "latitude": {
                              "type": "string",
                              "example": "41.308166",
                              "description": "Address latitude"
                            },
                            "longitude": {
                              "type": "string",
                              "example": "2.019725",
                              "description": "Address longitude"
                            },
                            "googlePlaceId": {
                              "type": "string",
                              "example": "xxxxxxxxxxxx",
                              "description": "Google place identifier"
                            },
                            "placeName": {
                              "type": "string",
                              "example": "C/ Example, 23, City name",
                              "description": "Place name"
                            }
                          }
                        },
                        "phone": {
                          "type": "string",
                          "example": "+34600000000",
                          "description": "Selling point phone"
                        },
                        "email": {
                          "type": "string",
                          "example": "myrestaurant@example.com",
                          "description": "Selling point contact email"
                        },
                        "logo": {
                          "type": "string",
                          "example": "http://mycdn.com/selling-point-logo.jpeg",
                          "description": "Selling point logo url"
                        },
                        "mainImage": {
                          "type": "string",
                          "example": "http://mycdn.com/selling-point-main-image.jpeg",
                          "description": "Selling point main image"
                        },
                        "description": {
                          "type": "string",
                          "example": "This restaurant...",
                          "description": "Selling point description"
                        },
                        "urlKey": {
                          "type": "string",
                          "example": "restaurant-name-city",
                          "description": "Encoded name for url"
                        },
                        "type": {
                          "type": "string",
                          "example": "Italian",
                          "description": "Type of selling point"
                        },
                        "allowedOrderTypes": {
                          "type": "array",
                          "description": "Codes array of allowed order types",
                          "items": {
                            "type": "string"
                          },
                          "example": [
                            "delivery",
                            "collection",
                            "insitu",
                            "reservation"
                          ]
                        }
                      }
                    },
                    "payments": {
                      "type": "array",
                      "description": "Order payments",
                      "items": {
                        "title": "Order",
                        "description": "",
                        "type": "object",
                        "required": [
                          "id",
                          "amount",
                          "paymentMethodName"
                        ],
                        "properties": {
                          "id": {
                            "type": "integer",
                            "format": "int64",
                            "example": 5922,
                            "description": "Order payment identifier"
                          },
                          "amount": {
                            "type": "number",
                            "format": "float",
                            "example": 29.9,
                            "description": "Payment amount"
                          },
                          "paymentMethodName": {
                            "type": "string",
                            "example": "Credit card",
                            "description": "Payment method name"
                          }
                        }
                      }
                    },
                    "orderLines": {
                      "type": "array",
                      "description": "Order items",
                      "items": {
                        "title": "OrderLine",
                        "description": "",
                        "type": "object",
                        "required": [
                          "id",
                          "totalAmount",
                          "unitPrice",
                          "quantity",
                          "label",
                          "type"
                        ],
                        "properties": {
                          "id": {
                            "type": "integer",
                            "format": "int64",
                            "description": "Order line identifier",
                            "example": 8822
                          },
                          "totalAmount": {
                            "type": "number",
                            "format": "float",
                            "description": "Order line total amount",
                            "example": 29.9
                          },
                          "unitPrice": {
                            "type": "number",
                            "format": "float",
                            "description": "Order line total amount",
                            "example": 14.95
                          },
                          "quantity": {
                            "type": "integer",
                            "format": "int64",
                            "description": "Order line quantity",
                            "example": 2
                          },
                          "comment": {
                            "type": "string",
                            "description": "Order line comment",
                            "example": ""
                          },
                          "label": {
                            "type": "string",
                            "description": "Order line label",
                            "example": "Pizza margherita"
                          },
                          "type": {
                            "type": "string",
                            "description": "Order type code",
                            "enum": [
                              "PRODUCT",
                              "MENU",
                              "PRODUCT_OPTIONS",
                              "DISCOUNT",
                              "DELIVERY",
                              "CUSTOM",
                              "POS_ITEM"
                            ],
                            "example": "PRODUCT"
                          },
                          "childrenOrderLines": {
                            "type": "array",
                            "description": "Children order lines",
                            "items": {
                              "type": "object"
                            }
                          }
                        }
                      }
                    },
                    "deliveryAmount": {
                      "type": "number",
                      "format": "float",
                      "example": 1,
                      "description": "Delivery amount. Only for delivery orders."
                    },
                    "deliveryAddress": {
                      "title": "Delivery order address. Only for delivery orders",
                      "type": "object",
                      "required": [
                        "id",
                        "street"
                      ],
                      "description": "",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "format": "int64",
                          "example": 1003,
                          "description": "Address identifier"
                        },
                        "street": {
                          "type": "string",
                          "example": "C/ Example, 23",
                          "description": "Address street with number"
                        },
                        "details": {
                          "type": "string",
                          "example": "Canada building",
                          "description": "Extra address information"
                        },
                        "city": {
                          "type": "string",
                          "example": "City name",
                          "description": "Address city name"
                        },
                        "province": {
                          "type": "string",
                          "example": "Province name",
                          "description": "Address province name"
                        },
                        "postalCode": {
                          "type": "string",
                          "example": "12345",
                          "description": "Address postal code"
                        },
                        "latitude": {
                          "type": "string",
                          "example": "41.308166",
                          "description": "Address latitude"
                        },
                        "longitude": {
                          "type": "string",
                          "example": "2.019725",
                          "description": "Address longitude"
                        },
                        "googlePlaceId": {
                          "type": "string",
                          "example": "xxxxxxxxxxxx",
                          "description": "Google place identifier"
                        },
                        "placeName": {
                          "type": "string",
                          "example": "C/ Example, 23, City name",
                          "description": "Place name"
                        }
                      }
                    },
                    "dinersNumber": {
                      "type": "integer",
                      "format": "int64",
                      "example": 6,
                      "description": "Number of diners. Only for reservations."
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": {
                      "id": 4912,
                      "totalAmount": "29.90",
                      "executionTimeLabel": "11/10 at 13:10h",
                      "executionTime": "2017-10-11T13:10:00+0000",
                      "comment": "Thank you",
                      "cancellationComment": "",
                      "consumer": {
                        "id": "1003",
                        "email": "john@example.com",
                        "name": "John",
                        "lastname": "Doe",
                        "image": "https://cdn.sinqro.com/assets/images/placeholder_image.jpg",
                        "phone": "+34600000000"
                      },
                      "status": {
                        "code": "waiting_sp_validation",
                        "name": "Waiting selling point validation",
                        "color": "#f7981d",
                        "callToAction": "",
                        "isFinalStatus": false,
                        "globalStatusCode": "processing"
                      },
                      "type": "delivery",
                      "sellingPoint": {
                        "id": 3442,
                        "name": "My restaurant",
                        "address": {
                          "id": 1003,
                          "street": "C/ Example, 23",
                          "details": "Canada building",
                          "city": "City name",
                          "province": "Province name",
                          "postalCode": "12345",
                          "latitude": "41.308166",
                          "longitude": "2.019725",
                          "googlePlaceId": "xxxxxxxxxxxx",
                          "placeName": "C/ Example, 23, City name"
                        },
                        "phone": "+34600000000",
                        "email": "myrestaurant@example.com",
                        "logo": "http://mycdn.com/selling-point-logo.jpeg",
                        "mainImage": "http://mycdn.com/selling-point-main-image.jpeg",
                        "description": "This restaurant...",
                        "urlKey": "restaurant-name-city",
                        "type": "Italian",
                        "allowedOrderTypes": [
                          "delivery",
                          "collection",
                          "insitu",
                          "reservation"
                        ]
                      },
                      "payments": [
                        {
                          "id": 5922,
                          "amount": 29.9,
                          "paymentMethodName": "Credit card"
                        }
                      ],
                      "orderLines": [
                        {
                          "id": 8822,
                          "totalAmount": 29.9,
                          "unitPrice": 14.95,
                          "quantity": 2,
                          "comment": "",
                          "label": "Pizza margherita",
                          "type": "PRODUCT",
                          "childrenOrderLines": [
                            []
                          ]
                        }
                      ],
                      "deliveryAmount": 1,
                      "deliveryAddress": {
                        "id": 1003,
                        "street": "C/ Example, 23",
                        "details": "Canada building",
                        "city": "City name",
                        "province": "Province name",
                        "postalCode": "12345",
                        "latitude": "41.308166",
                        "longitude": "2.019725",
                        "googlePlaceId": "xxxxxxxxxxxx",
                        "placeName": "C/ Example, 23, City name"
                      },
                      "dinersNumber": 6
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Order"
        ]
      }
    },
    "/consumers/{consumerId}/orders/{orderId}/status": {
      "get": {
        "summary": "Get order status",
        "description": "Get consumer order current status",
        "operationId": "getConsumerOrderStatus",
        "parameters": [
          {
            "name": "consumerId",
            "in": "path",
            "description": "Consumer identifier",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "orderId",
            "in": "path",
            "description": "Order identifier",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "title": "OrderStatus",
                  "type": "object",
                  "description": "Order current status",
                  "required": [
                    "code",
                    "name",
                    "color"
                  ],
                  "properties": {
                    "code": {
                      "type": "string",
                      "example": "waiting_sp_validation",
                      "description": "Status identifier code",
                      "enum": [
                        "waiting_sp_validation",
                        "accepted",
                        "preparation",
                        "ready",
                        "delivering",
                        "delivered",
                        "incident",
                        "cancelled",
                        "finished",
                        "reservation_accepted",
                        "cancelled_by_sp",
                        "cancelled_by_client",
                        "cancelled_by_driver",
                        "cancelled_by_team",
                        "payment_authorisation_failed"
                      ]
                    },
                    "name": {
                      "type": "string",
                      "example": "Waiting selling point validation",
                      "description": "Status name"
                    },
                    "color": {
                      "type": "string",
                      "example": "#f7981d",
                      "description": "Status color"
                    },
                    "callToAction": {
                      "type": "string",
                      "example": "",
                      "description": "Call to action if is needed"
                    },
                    "globalStatusCode": {
                      "type": "string",
                      "example": "processing",
                      "description": "Order global status identifier code"
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": {
                      "code": "waiting_sp_validation",
                      "name": "Waiting selling point validation",
                      "color": "#f7981d",
                      "callToAction": "",
                      "globalStatusCode": "processing"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Order"
        ]
      }
    },
    "/consumers/{consumerId}/orders/{orderId}/cancel": {
      "post": {
        "summary": "Cancel order",
        "description": "Cancel order. Order only can be cancelled by client if selling point has not accepted it",
        "operationId": "postConsumerOrderCancellation",
        "parameters": [
          {
            "name": "consumerId",
            "in": "path",
            "description": "Consumer identifier",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "orderId",
            "in": "path",
            "description": "Order identifier",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Order",
                  "description": "",
                  "type": "object",
                  "required": [
                    "id",
                    "totalAmount",
                    "executionTimeLabel",
                    "executionTime",
                    "consumer",
                    "status",
                    "type",
                    "sellingPoint",
                    "payments",
                    "orderLines"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer",
                      "format": "int64",
                      "example": 4912,
                      "description": "Order identifier"
                    },
                    "totalAmount": {
                      "type": "number",
                      "format": "float",
                      "example": "29.90",
                      "description": "Total order amount"
                    },
                    "executionTimeLabel": {
                      "type": "string",
                      "example": "11/10 at 13:10h",
                      "description": "Short text representing order execution time"
                    },
                    "executionTime": {
                      "type": "string",
                      "example": "2017-10-11T13:10:00+0000",
                      "description": "Order execution time"
                    },
                    "comment": {
                      "type": "string",
                      "example": "Thank you",
                      "description": "Consumer order comment"
                    },
                    "cancellationComment": {
                      "type": "string",
                      "example": "",
                      "description": "Only if order is cancelled"
                    },
                    "consumer": {
                      "title": "Consumer",
                      "description": "",
                      "type": "object",
                      "required": [
                        "id",
                        "name",
                        "email"
                      ],
                      "properties": {
                        "id": {
                          "type": "integer",
                          "format": "int64",
                          "example": "1003",
                          "description": "Consumer identifier"
                        },
                        "email": {
                          "type": "string",
                          "example": "john@example.com",
                          "description": "Consumer email"
                        },
                        "name": {
                          "type": "string",
                          "example": "John",
                          "description": "Consumer name"
                        },
                        "lastname": {
                          "type": "string",
                          "example": "Doe",
                          "description": "Consumer last name"
                        },
                        "image": {
                          "type": "string",
                          "example": "https://cdn.sinqro.com/assets/images/placeholder_image.jpg",
                          "description": "Consumer profile image url"
                        },
                        "phone": {
                          "type": "string",
                          "example": "+34600000000",
                          "description": "In international format. Ex. +34600000000"
                        }
                      }
                    },
                    "status": {
                      "title": "OrderStatus",
                      "type": "object",
                      "description": "Order current status",
                      "required": [
                        "code",
                        "name",
                        "color"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "waiting_sp_validation",
                          "description": "Status identifier code",
                          "enum": [
                            "waiting_sp_validation",
                            "accepted",
                            "preparation",
                            "ready",
                            "delivering",
                            "delivered",
                            "incident",
                            "cancelled",
                            "finished",
                            "reservation_accepted",
                            "cancelled_by_sp",
                            "cancelled_by_client",
                            "cancelled_by_driver",
                            "cancelled_by_team",
                            "payment_authorisation_failed"
                          ]
                        },
                        "name": {
                          "type": "string",
                          "example": "Waiting selling point validation",
                          "description": "Status name"
                        },
                        "color": {
                          "type": "string",
                          "example": "#f7981d",
                          "description": "Status color"
                        },
                        "callToAction": {
                          "type": "string",
                          "example": "",
                          "description": "Call to action if is needed"
                        },
                        "isFinalStatus": {
                          "type": "boolean",
                          "example": false,
                          "description": "Return if status is final status and doesn't require interaction"
                        },
                        "globalStatusCode": {
                          "type": "string",
                          "example": "processing",
                          "description": "Order global status identifier code"
                        }
                      }
                    },
                    "type": {
                      "type": "string",
                      "example": "delivery",
                      "description": "Order type code",
                      "enum": [
                        "delivery",
                        "collection",
                        "insitu",
                        "reservation"
                      ]
                    },
                    "sellingPoint": {
                      "title": "SellingPoint",
                      "type": "object",
                      "required": [
                        "id",
                        "name",
                        "address"
                      ],
                      "description": "Selling point data",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "format": "int64",
                          "example": 3442,
                          "description": "Selling point identifier"
                        },
                        "name": {
                          "type": "string",
                          "example": "My restaurant",
                          "description": "Selling point name"
                        },
                        "address": {
                          "title": "Address",
                          "type": "object",
                          "required": [
                            "id",
                            "street"
                          ],
                          "description": "Selling point address",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "format": "int64",
                              "example": 1003,
                              "description": "Address identifier"
                            },
                            "street": {
                              "type": "string",
                              "example": "C/ Example, 23",
                              "description": "Address street with number"
                            },
                            "details": {
                              "type": "string",
                              "example": "Canada building",
                              "description": "Extra address information"
                            },
                            "city": {
                              "type": "string",
                              "example": "City name",
                              "description": "Address city name"
                            },
                            "province": {
                              "type": "string",
                              "example": "Province name",
                              "description": "Address province name"
                            },
                            "postalCode": {
                              "type": "string",
                              "example": "12345",
                              "description": "Address postal code"
                            },
                            "latitude": {
                              "type": "string",
                              "example": "41.308166",
                              "description": "Address latitude"
                            },
                            "longitude": {
                              "type": "string",
                              "example": "2.019725",
                              "description": "Address longitude"
                            },
                            "googlePlaceId": {
                              "type": "string",
                              "example": "xxxxxxxxxxxx",
                              "description": "Google place identifier"
                            },
                            "placeName": {
                              "type": "string",
                              "example": "C/ Example, 23, City name",
                              "description": "Place name"
                            }
                          }
                        },
                        "phone": {
                          "type": "string",
                          "example": "+34600000000",
                          "description": "Selling point phone"
                        },
                        "email": {
                          "type": "string",
                          "example": "myrestaurant@example.com",
                          "description": "Selling point contact email"
                        },
                        "logo": {
                          "type": "string",
                          "example": "http://mycdn.com/selling-point-logo.jpeg",
                          "description": "Selling point logo url"
                        },
                        "mainImage": {
                          "type": "string",
                          "example": "http://mycdn.com/selling-point-main-image.jpeg",
                          "description": "Selling point main image"
                        },
                        "description": {
                          "type": "string",
                          "example": "This restaurant...",
                          "description": "Selling point description"
                        },
                        "urlKey": {
                          "type": "string",
                          "example": "restaurant-name-city",
                          "description": "Encoded name for url"
                        },
                        "type": {
                          "type": "string",
                          "example": "Italian",
                          "description": "Type of selling point"
                        },
                        "allowedOrderTypes": {
                          "type": "array",
                          "description": "Codes array of allowed order types",
                          "items": {
                            "type": "string"
                          },
                          "example": [
                            "delivery",
                            "collection",
                            "insitu",
                            "reservation"
                          ]
                        }
                      }
                    },
                    "payments": {
                      "type": "array",
                      "description": "Order payments",
                      "items": {
                        "title": "Order",
                        "description": "",
                        "type": "object",
                        "required": [
                          "id",
                          "amount",
                          "paymentMethodName"
                        ],
                        "properties": {
                          "id": {
                            "type": "integer",
                            "format": "int64",
                            "example": 5922,
                            "description": "Order payment identifier"
                          },
                          "amount": {
                            "type": "number",
                            "format": "float",
                            "example": 29.9,
                            "description": "Payment amount"
                          },
                          "paymentMethodName": {
                            "type": "string",
                            "example": "Credit card",
                            "description": "Payment method name"
                          }
                        }
                      }
                    },
                    "orderLines": {
                      "type": "array",
                      "description": "Order items",
                      "items": {
                        "title": "OrderLine",
                        "description": "",
                        "type": "object",
                        "required": [
                          "id",
                          "totalAmount",
                          "unitPrice",
                          "quantity",
                          "label",
                          "type"
                        ],
                        "properties": {
                          "id": {
                            "type": "integer",
                            "format": "int64",
                            "description": "Order line identifier",
                            "example": 8822
                          },
                          "totalAmount": {
                            "type": "number",
                            "format": "float",
                            "description": "Order line total amount",
                            "example": 29.9
                          },
                          "unitPrice": {
                            "type": "number",
                            "format": "float",
                            "description": "Order line total amount",
                            "example": 14.95
                          },
                          "quantity": {
                            "type": "integer",
                            "format": "int64",
                            "description": "Order line quantity",
                            "example": 2
                          },
                          "comment": {
                            "type": "string",
                            "description": "Order line comment",
                            "example": ""
                          },
                          "label": {
                            "type": "string",
                            "description": "Order line label",
                            "example": "Pizza margherita"
                          },
                          "type": {
                            "type": "string",
                            "description": "Order type code",
                            "enum": [
                              "PRODUCT",
                              "MENU",
                              "PRODUCT_OPTIONS",
                              "DISCOUNT",
                              "DELIVERY",
                              "CUSTOM",
                              "POS_ITEM"
                            ],
                            "example": "PRODUCT"
                          },
                          "childrenOrderLines": {
                            "type": "array",
                            "description": "Children order lines",
                            "items": {
                              "type": "object"
                            }
                          }
                        }
                      }
                    },
                    "deliveryAmount": {
                      "type": "number",
                      "format": "float",
                      "example": 1,
                      "description": "Delivery amount. Only for delivery orders."
                    },
                    "deliveryAddress": {
                      "title": "Delivery order address. Only for delivery orders",
                      "type": "object",
                      "required": [
                        "id",
                        "street"
                      ],
                      "description": "",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "format": "int64",
                          "example": 1003,
                          "description": "Address identifier"
                        },
                        "street": {
                          "type": "string",
                          "example": "C/ Example, 23",
                          "description": "Address street with number"
                        },
                        "details": {
                          "type": "string",
                          "example": "Canada building",
                          "description": "Extra address information"
                        },
                        "city": {
                          "type": "string",
                          "example": "City name",
                          "description": "Address city name"
                        },
                        "province": {
                          "type": "string",
                          "example": "Province name",
                          "description": "Address province name"
                        },
                        "postalCode": {
                          "type": "string",
                          "example": "12345",
                          "description": "Address postal code"
                        },
                        "latitude": {
                          "type": "string",
                          "example": "41.308166",
                          "description": "Address latitude"
                        },
                        "longitude": {
                          "type": "string",
                          "example": "2.019725",
                          "description": "Address longitude"
                        },
                        "googlePlaceId": {
                          "type": "string",
                          "example": "xxxxxxxxxxxx",
                          "description": "Google place identifier"
                        },
                        "placeName": {
                          "type": "string",
                          "example": "C/ Example, 23, City name",
                          "description": "Place name"
                        }
                      }
                    },
                    "dinersNumber": {
                      "type": "integer",
                      "format": "int64",
                      "example": 6,
                      "description": "Number of diners. Only for reservations."
                    }
                  }
                },
                "examples": {
                  "response": {
                    "value": {
                      "id": 4912,
                      "totalAmount": "29.90",
                      "executionTimeLabel": "11/10 at 13:10h",
                      "executionTime": "2017-10-11T13:10:00+0000",
                      "comment": "Thank you",
                      "cancellationComment": "",
                      "consumer": {
                        "id": "1003",
                        "email": "john@example.com",
                        "name": "John",
                        "lastname": "Doe",
                        "image": "https://cdn.sinqro.com/assets/images/placeholder_image.jpg",
                        "phone": "+34600000000"
                      },
                      "status": {
                        "code": "waiting_sp_validation",
                        "name": "Waiting selling point validation",
                        "color": "#f7981d",
                        "callToAction": "",
                        "isFinalStatus": false,
                        "globalStatusCode": "processing"
                      },
                      "type": "delivery",
                      "sellingPoint": {
                        "id": 3442,
                        "name": "My restaurant",
                        "address": {
                          "id": 1003,
                          "street": "C/ Example, 23",
                          "details": "Canada building",
                          "city": "City name",
                          "province": "Province name",
                          "postalCode": "12345",
                          "latitude": "41.308166",
                          "longitude": "2.019725",
                          "googlePlaceId": "xxxxxxxxxxxx",
                          "placeName": "C/ Example, 23, City name"
                        },
                        "phone": "+34600000000",
                        "email": "myrestaurant@example.com",
                        "logo": "http://mycdn.com/selling-point-logo.jpeg",
                        "mainImage": "http://mycdn.com/selling-point-main-image.jpeg",
                        "description": "This restaurant...",
                        "urlKey": "restaurant-name-city",
                        "type": "Italian",
                        "allowedOrderTypes": [
                          "delivery",
                          "collection",
                          "insitu",
                          "reservation"
                        ]
                      },
                      "payments": [
                        {
                          "id": 5922,
                          "amount": 29.9,
                          "paymentMethodName": "Credit card"
                        }
                      ],
                      "orderLines": [
                        {
                          "id": 8822,
                          "totalAmount": 29.9,
                          "unitPrice": 14.95,
                          "quantity": 2,
                          "comment": "",
                          "label": "Pizza margherita",
                          "type": "PRODUCT",
                          "childrenOrderLines": [
                            []
                          ]
                        }
                      ],
                      "deliveryAmount": 1,
                      "deliveryAddress": {
                        "id": 1003,
                        "street": "C/ Example, 23",
                        "details": "Canada building",
                        "city": "City name",
                        "province": "Province name",
                        "postalCode": "12345",
                        "latitude": "41.308166",
                        "longitude": "2.019725",
                        "googlePlaceId": "xxxxxxxxxxxx",
                        "placeName": "C/ Example, 23, City name"
                      },
                      "dinersNumber": 6
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Order"
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "comment": {
                    "description": "Cancellation comment",
                    "type": "string"
                  }
                },
                "required": [
                  "comment"
                ]
              }
            }
          }
        }
      }
    }
  },
  "externalDocs": {
    "description": "Find out more about Sinqro Developer",
    "url": "https://www.sinqro.com"
  },
  "components": {
    "requestBodies": {
      "postConsumerAddress": {
        "content": {
          "application/x-www-form-urlencoded": {
            "schema": {
              "type": "object",
              "properties": {
                "googlePlaceId": {
                  "description": "GooglePlace identifier",
                  "type": "string"
                },
                "details": {
                  "description": "Address details",
                  "type": "string"
                }
              },
              "required": [
                "googlePlaceId",
                "details"
              ]
            }
          }
        }
      },
      "postOrderValidationParameters": {
        "content": {
          "application/json": {
            "schema": {
              "title": "CheckoutParams",
              "description": "",
              "type": "object",
              "required": [
                "marketId",
                "orderType",
                "sellingPointId"
              ],
              "properties": {
                "comment": {
                  "type": "string",
                  "example": "",
                  "description": "Consumer order comment"
                },
                "orderType": {
                  "type": "string",
                  "example": "delivery",
                  "description": "Consumer order comment",
                  "enum": [
                    "delivery",
                    "collection",
                    "insitu",
                    "reservation"
                  ]
                },
                "consumerId": {
                  "type": "integer",
                  "format": "int64",
                  "example": 852,
                  "description": "Consumer identifier"
                },
                "marketId": {
                  "type": "integer",
                  "format": "int64",
                  "example": 114,
                  "description": "Market identifier"
                },
                "sellingPointId": {
                  "type": "integer",
                  "format": "int64",
                  "example": 532,
                  "description": "Selling point identifier"
                },
                "addressId": {
                  "type": "integer",
                  "format": "int64",
                  "example": 998,
                  "description": "Used in delivery orders"
                },
                "executionTime": {
                  "type": "string",
                  "format": "date-time",
                  "example": "2017-10-12T21:30:00+0000",
                  "description": "Selected execution time. Can be date time value or 'asap'"
                },
                "items": {
                  "type": "array",
                  "items": {
                    "title": "CheckoutItem",
                    "description": "",
                    "type": "object",
                    "required": [
                      "id",
                      "type"
                    ],
                    "properties": {
                      "comment": {
                        "type": "string",
                        "example": "",
                        "description": "Consumer item comment"
                      },
                      "quantity": {
                        "type": "integer",
                        "format": "int64",
                        "example": 2,
                        "description": "Quantity of same item"
                      },
                      "menuSectionId": {
                        "type": "integer",
                        "format": "int64",
                        "example": 171,
                        "description": "Item menu section identifier. Only used in 'product' items"
                      },
                      "id": {
                        "type": "integer",
                        "format": "int64",
                        "example": 2722,
                        "description": "Item identifier"
                      },
                      "type": {
                        "type": "string",
                        "example": "product",
                        "description": "Item type code",
                        "enum": [
                          "menu",
                          "product",
                          "product-option"
                        ]
                      },
                      "items": {
                        "type": "array",
                        "description": "Children items",
                        "items": {
                          "title": "CheckoutItem",
                          "description": "",
                          "type": "object",
                          "required": [
                            "id",
                            "type"
                          ],
                          "properties": {
                            "comment": {
                              "type": "string",
                              "example": "",
                              "description": "Consumer item comment"
                            },
                            "quantity": {
                              "type": "integer",
                              "format": "int64",
                              "example": 2,
                              "description": "Quantity of same item"
                            },
                            "menuSectionId": {
                              "type": "integer",
                              "format": "int64",
                              "example": 171,
                              "description": "Item menu section identifier. Only used in 'product' items"
                            },
                            "id": {
                              "type": "integer",
                              "format": "int64",
                              "example": 2722,
                              "description": "Item identifier"
                            },
                            "type": {
                              "type": "string",
                              "example": "product",
                              "description": "Item type code",
                              "enum": [
                                "menu",
                                "product",
                                "product-option"
                              ]
                            }
                          }
                        }
                      }
                    }
                  },
                  "description": "Array of cart items"
                },
                "payments": {
                  "type": "array",
                  "items": {
                    "title": "CheckoutPayment",
                    "description": "",
                    "type": "object",
                    "required": [
                      "methodCode"
                    ],
                    "properties": {
                      "creditCardId": {
                        "type": "integer",
                        "format": "int64",
                        "example": 1003,
                        "description": "Credit card identifier. Only used in creadit card payments"
                      },
                      "amount": {
                        "type": "number",
                        "format": "float",
                        "example": "28.60",
                        "description": "Payment amount. If payment amount is null payment is used to pay order total amount"
                      },
                      "methodCode": {
                        "type": "string",
                        "example": "CREDIT_CARD_ONLINE",
                        "description": "Payment method code"
                      }
                    }
                  },
                  "description": "Array of payments"
                }
              }
            }
          }
        },
        "required": true
      }
    },
    "securitySchemes": {
      "security_server_token": {
        "type": "apiKey",
        "name": "x-api-server-access-token",
        "description": "Authentication token Test: `6203ec40568af3a3e606bec682516409`",
        "in": "header"
      },
      "security_user_token": {
        "type": "apiKey",
        "name": "x-api-user-access-token",
        "description": "Authorization token",
        "in": "header"
      }
    }
  },
  "x-tagGroups": [
    {
      "name": "Market App",
      "tags": [
        "Client",
        "Consumer",
        "Order",
        "Address and places",
        "Credit cards",
        "Coupons",
        "SellingPoint"
      ]
    }
  ]
}
