Nyehandel
  1. Order
Nyehandel
  • Introduction
  • Getting started
  • Webhooks
  • API Reference
  • Order
    • Get order
      GET
    • Get orders
      GET
    • Create order
      POST
    • Deliver order
      POST
  • Shipping Method
    • Get Shipping methods
      GET
  • Product
    • Relation between products and variants
    • Get products
      GET
    • Update products batch
      PUT
    • Create products batch
      POST
    • Create product
      POST
    • Update product
      PUT
    • Create variant
      POST
    • Find product by sku or id
      GET
    • Delete product
      DELETE
  • Variant
    • Update variant batch
      PUT
    • Update variant
      PUT
    • Delete product variant
      DELETE
    • Find variant
      GET
  • Payment Method
    • Get Payment methods
      GET
  • Customer
    • Get Customer
      GET
    • Get Customers
      GET
    • Create Customer
      POST
  • Category
    • Create category
    • Update category
    • Get category
    • Delete category
    • Get categories
  • Currency
    • Get currencies
  • Headless
    • Pages
      • Get Page
      • Get Pages
    • Categories
      • Get Category
      • Get Pages
    • Startpage
    • System
  1. Order

Create order

POST
/orders
Create an order
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/orders' \
--header 'X-Identifier: {{x_identifier}}' \
--header 'Authorization: Bearer {{token}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
	"currency_iso": "SEK",
	"locale": "SV-se",
	"customer": {
		"type": "organization",
		"email": "manual_order@nyehandel.se",
		"phone": "0733111111",
		"ssn": "9001011234",
		"organization_number": "5592412075"
	},
	"billing_address": {
		"company_name": "Företaget AB",
		"firstname": "Peter",
		"lastname": "Nilsson",
		"address": "Testgatan 11",
		"postcode": "12345",
		"city": "Kristianstad",
		"country": "SE"
	},
	"shipping_address": {
		"company_name": "Företag två AB",
		"firstname": "Nils",
		"lastname": "Petersson",
		"address": "Skeppsvägen 620",
		"postcode": "54321",
		"city": "Hässleholm",
		"country": "SE"
	},
	"shipping": {
		"name": "Postnord - MyPack",
		"price_ex_vat": 10000,
		"price_inc_vat": 12500
	},
	"payment": {
		"name": "Faktura",
		"price_ex_vat": 10000,
		"price_inc_vat": 12500
	},
	"items": [
		{
			"type": "product",
			"sku": "117849",
			"quantity": 3,
			"price_ex_vat": 10000,
			"price_inc_vat": 12500
		}
	]
}'
Response Response Example
{
  "data": {
    "id": 0,
    "currency_iso": "string",
    "order_items": [
      {
        "id": 0,
        "sku": "string",
        "name": "string",
        "type": "string",
        "quantity": "string",
        "unit": "string",
        "vat_rate": 0,
        "unit_price": 0,
        "total_amount": 0,
        "image_url": "string",
        "variant_url": "string"
      }
    ],
    "customer": {
      "id": 0,
      "customer_type": "string",
      "firstname": "string",
      "lastname": "string",
      "email": "string",
      "phone": null,
      "ssn": null,
      "created_at": "string",
      "updated_at": "string",
      "billing_address": {
        "address": "string",
        "address2": null,
        "co_address": null,
        "postcode": "string",
        "city": "string",
        "state": null,
        "country": "string",
        "company_name": null,
        "firstname": "string",
        "lastname": "string"
      },
      "shipping_address": {
        "address": "string",
        "address2": null,
        "co_address": null,
        "postcode": "string",
        "city": "string",
        "state": null,
        "country": "string",
        "company_name": null,
        "firstname": "string",
        "lastname": "string"
      }
    },
    "billing_address": {
      "address": "string",
      "address2": null,
      "co_address": null,
      "postcode": "string",
      "city": "string",
      "state": null,
      "country": "string",
      "company_name": "string",
      "firstname": "string",
      "lastname": "string"
    },
    "shipping_address": {
      "address": "string",
      "address2": null,
      "co_address": null,
      "postcode": "string",
      "city": "string",
      "state": null,
      "country": "string",
      "company_name": "string",
      "firstname": "string",
      "lastname": "string"
    },
    "shipping": {
      "name": "string",
      "vat_rate": 0,
      "total_amount": 0
    },
    "payment": {
      "name": "string",
      "vat_rate": 0,
      "total_amount": 0
    },
    "created_at": "string",
    "updated_at": "string"
  }
}

Request

Header Params
X-Identifier
string 
required
Example:
{{x_identifier}}
Authorization
string 
required
Example:
Bearer {{token}}
Accept
enum<string> 
required
Allowed value:
application/json
Example:
application/json
Content-Type
enum<string> 
required
Allowed value:
application/json
Example:
application/json
Body Params application/json
currency_iso
string 
required
3 Letter currency code, ISO 4217
locale
string 
required
language (2 letters), followed by a dash and country (2 letters)
Example:
SV-se
Match pattern:
^[A-Za-z]{2,2}(?:-[A-Za-z]{2,2})$
delivery_date
string 
optional
Example:
2024-01-01
warehouse_note
string 
optional
marking
string 
optional
reference
string 
optional
checkout_message
string 
optional
<= 255 characters
action
enum<string> 
optional
Allowed value:
approve
customer
object 
required
type
enum<string> 
required
Allowed values:
personorganization
email
string 
required
phone
string 
optional
ssn
string 
optional
organization_number
string 
optional
billing_address
object 
required
company_name
string 
optional
Required if customer type is organization
firstname
string 
required
lastname
string 
required
address
string 
required
address2
string 
required
co_address
string 
required
postcode
string 
required
city
string 
required
country
string 
required
state
string 
required
shipping_address
object 
optional
company_name
string 
optional
Required if customer type is organization
firstname
string 
required
lastname
string 
required
address
string 
required
address2
string 
required
co_address
string 
required
postcode
string 
required
city
string 
required
country
string 
required
state
string 
required
shipping
object 
required
id
string 
required
price_ex_vat
integer 
required
price_inc_vat
integer 
required
payment
object 
required
id
string 
required
price_ex_vat
integer 
required
price_inc_vat
integer 
required
items
array [object {5}] 
required
type
string 
required
sku
string 
required
quantity
integer 
required
price_ex_vat
integer 
required
price_inc_vat
integer 
required
Examples

Responses

🟢200Success
application/json
Body
data
object 
required
id
integer 
required
currency_iso
string 
required
order_items
array [object {11}] 
required
customer
object 
required
billing_address
object 
required
shipping_address
object 
required
shipping
object 
required
payment
object 
required
created_at
string 
required
updated_at
string 
required
Previous
Get orders
Next
Deliver order
Built with