---
updatedAt: 2026-04-29T14:21:45.000Z
agentTools:
  projectIndex: https://docs.sequra.com/llms.txt
---

# Create order

Creates a regular (PP3) order via the Public API

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "instore-api",
    "version": "v1"
  },
  "servers": [
    {
      "url": "http://localhost:3009"
    },
    {
      "url": "https://instore-sandbox.sequrapi.com/"
    },
    {
      "url": "https://instore.sequrapi.com/"
    },
    {
      "url": "https://{defaultHost}",
      "variables": {
        "defaultHost": {
          "default": "www.example.com"
        }
      }
    }
  ],
  "paths": {
    "/api/public/v1/orders": {
      "post": {
        "summary": "Create order",
        "tags": [
          "Orders"
        ],
        "description": "Creates a regular (PP3) order via the Public API",
        "security": [
          {
            "basic_auth": []
          }
        ],
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "examples": {
              "successful": {
                "value": "Basic YXBpdXNlcjE6YXBpdXNlcjE="
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "successful",
            "content": {
              "application/json": {
                "examples": {
                  "successful": {
                    "value": {
                      "id": 953,
                      "reference": "order-bc345ad5",
                      "code": "QNSTEPBUoeLKu75t",
                      "cart_items": [
                        {
                          "id": "2eccbf6d-7c4e-4651-9147-3d92805bf8f6",
                          "type": "material_purchase",
                          "reference": "item1",
                          "reference_uuid": "eb4acff9-0224-4957-80bb-74e92ff96431",
                          "name": "Test Item",
                          "price_with_tax": {
                            "value": 10000,
                            "string": "100,00 €"
                          },
                          "quantity": 1,
                          "total_with_tax": {
                            "value": 10000,
                            "string": "100,00 €"
                          }
                        }
                      ],
                      "sms_mobile_phone": "611222333",
                      "status": "pending",
                      "total_with_tax": {
                        "value": 10000,
                        "string": "100,00 €"
                      },
                      "total_subscription_price": {
                        "value": 0,
                        "string": "0,00 €"
                      },
                      "total_subscription_price_net": {
                        "value": 0,
                        "string": "0,00 €"
                      },
                      "total_subscription_price_tax": {
                        "value": 0,
                        "string": "0,00 €"
                      },
                      "products_subscription_price": {
                        "value": 0,
                        "string": "0,00 €"
                      },
                      "products_subscription_price_net": {
                        "value": 0,
                        "string": "0,00 €"
                      },
                      "products_subscription_price_tax": {
                        "value": 0,
                        "string": "0,00 €"
                      },
                      "total_subscription_products_value": {
                        "value": 0,
                        "string": "0,00 €"
                      },
                      "total_subscription_products_value_net": {
                        "value": 0,
                        "string": "0,00 €"
                      },
                      "total_subscription_products_value_tax": {
                        "value": 0,
                        "string": "0,00 €"
                      },
                      "meta": {},
                      "created_at": "2026-11-13T14:57:04.207Z",
                      "discount": {
                        "value": 0,
                        "string": "0,00 €"
                      },
                      "other_payment": null,
                      "cart_handling": null,
                      "cart_registration": null,
                      "setup_fee": null,
                      "desired_first_charge_on": null,
                      "solicitation": null,
                      "installments_count": null,
                      "operator_ref": "user_1@sequra.es",
                      "resettable": false,
                      "can_reset": false,
                      "can_resend_sms": true,
                      "customer_data": {
                        "given_names": "John",
                        "surnames": "Doe",
                        "first_surname": "",
                        "last_surname": "",
                        "nin": "12345678Z",
                        "email": "",
                        "phone": "",
                        "dob": "1980-01-01",
                        "address": "C Falsa, 1",
                        "city": "Barcelona",
                        "postal_code": "08001",
                        "colonia": "",
                        "region": "",
                        "joint_customer": "Jane Doe"
                      },
                      "order_uuid": null,
                      "subscription_id": null,
                      "withdrawable_subscription": false,
                      "currency": "EUR",
                      "joint_customer": "Jane Doe",
                      "cancelled_at": null,
                      "cancelled_by": null,
                      "status_steps": null,
                      "actions": [],
                      "cart_code": "QNSTEPBUoeLKu75t",
                      "cart_url": "http://localhost:3001/cart/QNSTEPBUoeLKu75t"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "unauthorized",
            "content": {
              "text/html": {
                "examples": {
                  "unauthorized": {
                    "value": "HTTP Basic: Access denied.\n"
                  }
                }
              }
            }
          },
          "422": {
            "description": "unprocessable entity",
            "content": {
              "application/json": {
                "examples": {
                  "when merchant is not found": {
                    "value": {
                      "errors": [
                        {
                          "code": "invalid",
                          "title": "Merchant not found"
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "merchant",
                  "operator_ref",
                  "cart_items"
                ],
                "properties": {
                  "merchant": {
                    "type": "object",
                    "required": [
                      "id",
                      "store_ref"
                    ],
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "store_ref": {
                        "type": "string"
                      }
                    }
                  },
                  "operator_ref": {
                    "type": "string"
                  },
                  "reference": {
                    "type": "string"
                  },
                  "cart_items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "reference": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "quantity": {
                          "type": "integer"
                        },
                        "price_with_tax": {
                          "type": "integer"
                        },
                        "type": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "given_names": {
                    "type": "string"
                  },
                  "surnames": {
                    "type": "string",
                    "description": "Customer's combined surnames. Use first_surname + second_surname instead for Mexican merchants."
                  },
                  "first_surname": {
                    "type": "string",
                    "description": "Customer's first surname. Used for Mexican merchants instead of surnames."
                  },
                  "second_surname": {
                    "type": "string",
                    "description": "Customer's second surname. Used for Mexican merchants instead of surnames."
                  },
                  "date_of_birth": {
                    "type": "string"
                  },
                  "nin": {
                    "type": "string"
                  },
                  "address": {
                    "type": "string"
                  },
                  "postal_code": {
                    "type": "string"
                  },
                  "city": {
                    "type": "string"
                  },
                  "colony": {
                    "type": "string",
                    "description": "Customer's neighborhood/colony. Used for Mexican merchants."
                  },
                  "joint_customer": {
                    "type": "string",
                    "description": "Name of a second account holder or beneficiary associated with this subscription."
                  }
                }
              },
              "examples": {
                "successful": {
                  "summary": "successful",
                  "value": {
                    "merchant": {
                      "id": "merchant_1",
                      "store_ref": "merchant_1"
                    },
                    "operator_ref": "user_1@sequra.es",
                    "mobile_phone": "611222333",
                    "reference": "order-bc345ad5",
                    "cart_items": [
                      {
                        "reference": "item1",
                        "name": "Test Item",
                        "quantity": 1,
                        "price_with_tax": 10000,
                        "type": "product"
                      }
                    ],
                    "given_names": "John",
                    "surnames": "Doe",
                    "date_of_birth": "1980-01-01",
                    "nin": "12345678Z",
                    "address": "C Falsa, 1",
                    "postal_code": "08001",
                    "city": "Barcelona",
                    "joint_customer": "Jane Doe"
                  }
                },
                "when merchant is not found": {
                  "summary": "when merchant is not found",
                  "value": {
                    "merchant": {
                      "id": "nonexistent_merchant_ref",
                      "store_ref": "merchant_1"
                    },
                    "operator_ref": "user_1@sequra.es",
                    "mobile_phone": "611222333",
                    "cart_items": [
                      {
                        "reference": "item1",
                        "name": "Test Item",
                        "quantity": 1,
                        "price_with_tax": 10000,
                        "type": "product"
                      }
                    ]
                  }
                }
              }
            }
          },
          "description": "Object with data required to create an order"
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "basic_auth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  }
}
```