Create external order
curl --request POST \
--url https://{tenant}.api.velocity.medshift.com/integrations/zapier/v1/external_orders/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"line_items": [
{
"quantity": 500000,
"product_variant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"unit_price": "<string>",
"tax_price": "<string>"
}
],
"billing_address": {
"first_name": "<string>",
"last_name": "<string>",
"street_1": "<string>",
"city": "<string>",
"country_iso2": "<string>",
"company": "",
"phone": "",
"street_2": "",
"state_province": "",
"postal_code": ""
},
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"shipping_price": "0.00",
"handling_price": "0.00",
"discount_price": "0.00",
"shipping_address": {
"first_name": "<string>",
"last_name": "<string>",
"street_1": "<string>",
"city": "<string>",
"country_iso2": "<string>",
"company": "",
"phone": "",
"street_2": "",
"state_province": "",
"postal_code": ""
},
"shipping_method": "<string>",
"customer_notes": "<string>",
"staff_notes": "<string>",
"custom_fields": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": null
}
],
"shipping_tax_price": "0.00",
"handling_tax_price": "0.00"
}
'import requests
url = "https://{tenant}.api.velocity.medshift.com/integrations/zapier/v1/external_orders/"
payload = {
"line_items": [
{
"quantity": 500000,
"product_variant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"unit_price": "<string>",
"tax_price": "<string>"
}
],
"billing_address": {
"first_name": "<string>",
"last_name": "<string>",
"street_1": "<string>",
"city": "<string>",
"country_iso2": "<string>",
"company": "",
"phone": "",
"street_2": "",
"state_province": "",
"postal_code": ""
},
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"shipping_price": "0.00",
"handling_price": "0.00",
"discount_price": "0.00",
"shipping_address": {
"first_name": "<string>",
"last_name": "<string>",
"street_1": "<string>",
"city": "<string>",
"country_iso2": "<string>",
"company": "",
"phone": "",
"street_2": "",
"state_province": "",
"postal_code": ""
},
"shipping_method": "<string>",
"customer_notes": "<string>",
"staff_notes": "<string>",
"custom_fields": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": None
}
],
"shipping_tax_price": "0.00",
"handling_tax_price": "0.00"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
line_items: [
{
quantity: 500000,
product_variant_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
unit_price: '<string>',
tax_price: '<string>'
}
],
billing_address: {
first_name: '<string>',
last_name: '<string>',
street_1: '<string>',
city: '<string>',
country_iso2: '<string>',
company: '',
phone: '',
street_2: '',
state_province: '',
postal_code: ''
},
customer_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
created_at: '2023-11-07T05:31:56Z',
shipping_price: '0.00',
handling_price: '0.00',
discount_price: '0.00',
shipping_address: {
first_name: '<string>',
last_name: '<string>',
street_1: '<string>',
city: '<string>',
country_iso2: '<string>',
company: '',
phone: '',
street_2: '',
state_province: '',
postal_code: ''
},
shipping_method: '<string>',
customer_notes: '<string>',
staff_notes: '<string>',
custom_fields: [{id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', value: null}],
shipping_tax_price: '0.00',
handling_tax_price: '0.00'
})
};
fetch('https://{tenant}.api.velocity.medshift.com/integrations/zapier/v1/external_orders/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenant}.api.velocity.medshift.com/integrations/zapier/v1/external_orders/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'line_items' => [
[
'quantity' => 500000,
'product_variant_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'unit_price' => '<string>',
'tax_price' => '<string>'
]
],
'billing_address' => [
'first_name' => '<string>',
'last_name' => '<string>',
'street_1' => '<string>',
'city' => '<string>',
'country_iso2' => '<string>',
'company' => '',
'phone' => '',
'street_2' => '',
'state_province' => '',
'postal_code' => ''
],
'customer_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'created_at' => '2023-11-07T05:31:56Z',
'shipping_price' => '0.00',
'handling_price' => '0.00',
'discount_price' => '0.00',
'shipping_address' => [
'first_name' => '<string>',
'last_name' => '<string>',
'street_1' => '<string>',
'city' => '<string>',
'country_iso2' => '<string>',
'company' => '',
'phone' => '',
'street_2' => '',
'state_province' => '',
'postal_code' => ''
],
'shipping_method' => '<string>',
'customer_notes' => '<string>',
'staff_notes' => '<string>',
'custom_fields' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'value' => null
]
],
'shipping_tax_price' => '0.00',
'handling_tax_price' => '0.00'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.api.velocity.medshift.com/integrations/zapier/v1/external_orders/"
payload := strings.NewReader("{\n \"line_items\": [\n {\n \"quantity\": 500000,\n \"product_variant_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"unit_price\": \"<string>\",\n \"tax_price\": \"<string>\"\n }\n ],\n \"billing_address\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"street_1\": \"<string>\",\n \"city\": \"<string>\",\n \"country_iso2\": \"<string>\",\n \"company\": \"\",\n \"phone\": \"\",\n \"street_2\": \"\",\n \"state_province\": \"\",\n \"postal_code\": \"\"\n },\n \"customer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"shipping_price\": \"0.00\",\n \"handling_price\": \"0.00\",\n \"discount_price\": \"0.00\",\n \"shipping_address\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"street_1\": \"<string>\",\n \"city\": \"<string>\",\n \"country_iso2\": \"<string>\",\n \"company\": \"\",\n \"phone\": \"\",\n \"street_2\": \"\",\n \"state_province\": \"\",\n \"postal_code\": \"\"\n },\n \"shipping_method\": \"<string>\",\n \"customer_notes\": \"<string>\",\n \"staff_notes\": \"<string>\",\n \"custom_fields\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"value\": null\n }\n ],\n \"shipping_tax_price\": \"0.00\",\n \"handling_tax_price\": \"0.00\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{tenant}.api.velocity.medshift.com/integrations/zapier/v1/external_orders/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"line_items\": [\n {\n \"quantity\": 500000,\n \"product_variant_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"unit_price\": \"<string>\",\n \"tax_price\": \"<string>\"\n }\n ],\n \"billing_address\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"street_1\": \"<string>\",\n \"city\": \"<string>\",\n \"country_iso2\": \"<string>\",\n \"company\": \"\",\n \"phone\": \"\",\n \"street_2\": \"\",\n \"state_province\": \"\",\n \"postal_code\": \"\"\n },\n \"customer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"shipping_price\": \"0.00\",\n \"handling_price\": \"0.00\",\n \"discount_price\": \"0.00\",\n \"shipping_address\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"street_1\": \"<string>\",\n \"city\": \"<string>\",\n \"country_iso2\": \"<string>\",\n \"company\": \"\",\n \"phone\": \"\",\n \"street_2\": \"\",\n \"state_province\": \"\",\n \"postal_code\": \"\"\n },\n \"shipping_method\": \"<string>\",\n \"customer_notes\": \"<string>\",\n \"staff_notes\": \"<string>\",\n \"custom_fields\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"value\": null\n }\n ],\n \"shipping_tax_price\": \"0.00\",\n \"handling_tax_price\": \"0.00\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.api.velocity.medshift.com/integrations/zapier/v1/external_orders/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"line_items\": [\n {\n \"quantity\": 500000,\n \"product_variant_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"unit_price\": \"<string>\",\n \"tax_price\": \"<string>\"\n }\n ],\n \"billing_address\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"street_1\": \"<string>\",\n \"city\": \"<string>\",\n \"country_iso2\": \"<string>\",\n \"company\": \"\",\n \"phone\": \"\",\n \"street_2\": \"\",\n \"state_province\": \"\",\n \"postal_code\": \"\"\n },\n \"customer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"shipping_price\": \"0.00\",\n \"handling_price\": \"0.00\",\n \"discount_price\": \"0.00\",\n \"shipping_address\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"street_1\": \"<string>\",\n \"city\": \"<string>\",\n \"country_iso2\": \"<string>\",\n \"company\": \"\",\n \"phone\": \"\",\n \"street_2\": \"\",\n \"state_province\": \"\",\n \"postal_code\": \"\"\n },\n \"shipping_method\": \"<string>\",\n \"customer_notes\": \"<string>\",\n \"staff_notes\": \"<string>\",\n \"custom_fields\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"value\": null\n }\n ],\n \"shipping_tax_price\": \"0.00\",\n \"handling_tax_price\": \"0.00\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bigcommerce_id": 123,
"is_external": true,
"is_archived": true,
"archived_at": "2023-11-07T05:31:56Z",
"customer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bigcommerce_id": 123,
"first_name": "<string>",
"last_name": "<string>",
"company_name": "<string>",
"email": "jsmith@example.com",
"phone": "<string>"
},
"created_by": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "jsmith@example.com",
"picture": "<string>"
},
"bigcommerce_status": "<string>",
"is_approved": true,
"approved_at": "2023-11-07T05:31:56Z",
"approved_by": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "jsmith@example.com",
"picture": "<string>"
},
"subtotal_price": "<string>",
"tax_price": "<string>",
"total_price": "<string>",
"store_credit": "<string>",
"payment": {
"online": {
"stripe_payment_intent_id": "<string>"
},
"terms": {
"due_date": "2023-12-25",
"is_capital": true,
"outstanding_balance": "<string>"
}
},
"coupons": [
{
"bigcommerce_coupon_id": 123,
"code": "<string>",
"discount_price": "<string>"
}
],
"is_digital": true,
"line_items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bigcommerce_id": 123,
"sku": "<string>",
"type": "<string>",
"quantity": 500000,
"total_price": "<string>",
"subtotal_price": "<string>",
"total_tax_price": "<string>",
"discount_price": "<string>",
"options": [
{
"display_name": "<string>",
"display_value": "<string>"
}
],
"name": "<string>",
"unit_price": "<string>",
"tax_price": "<string>"
}
],
"billing_address": {
"first_name": "<string>",
"last_name": "<string>",
"street_1": "<string>",
"city": "<string>",
"country_iso2": "<string>",
"company": "",
"phone": "",
"street_2": "",
"state_province": "",
"postal_code": ""
},
"subscription": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"created_at": "2023-11-07T05:31:56Z",
"shipping_price": "0.00",
"handling_price": "0.00",
"discount_price": "0.00",
"shipping_address": {
"first_name": "<string>",
"last_name": "<string>",
"street_1": "<string>",
"city": "<string>",
"country_iso2": "<string>",
"company": "",
"phone": "",
"street_2": "",
"state_province": "",
"postal_code": ""
},
"shipping_method": "<string>",
"customer_notes": "<string>",
"staff_notes": "<string>",
"custom_fields": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"value": null
}
]
}Authorizations
Body
Show child attributes
Show child attributes
Show child attributes
Show child attributes
0- Incomplete1- Pending2- Shipped3- Partially Shipped4- Refunded5- Cancelled6- Declined7- Awaiting Payment8- Awaiting Pickup9- Awaiting Shipment10- Completed11- Awaiting Fulfillment12- Manual Verification Required13- Disputed14- Partially Refunded
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 The cost of shipping before tax.
^-?\d{0,18}(?:\.\d{0,2})?$The cost of handling before tax.
^-?\d{0,18}(?:\.\d{0,2})?$The total amount of discounts.
^-?\d{0,18}(?:\.\d{0,2})?$Show child attributes
Show child attributes
1 - 2506553565535Show child attributes
Show child attributes
The amount of tax charged on the shipping cost.
^-?\d{0,18}(?:\.\d{0,2})?$The amount of tax charged on the handling cost.
^-?\d{0,18}(?:\.\d{0,2})?$Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The total cost of line items before discounts or tax.
^-?\d{0,18}(?:\.\d{0,2})?$The total amount of tax.
^-?\d{0,18}(?:\.\d{0,2})?$The total cost of the order, less store credit.
^-?\d{0,18}(?:\.\d{0,2})?$The amount of store credit applied.
^-?\d{0,18}(?:\.\d{0,2})?$Show child attributes
Show child attributes
Show child attributes
Show child attributes
If the order contains no physical (shippable) products.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
0- Incomplete1- Pending2- Shipped3- Partially Shipped4- Refunded5- Cancelled6- Declined7- Awaiting Payment8- Awaiting Pickup9- Awaiting Shipment10- Completed11- Awaiting Fulfillment12- Manual Verification Required13- Disputed14- Partially Refunded
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 The cost of shipping before tax.
^-?\d{0,18}(?:\.\d{0,2})?$The cost of handling before tax.
^-?\d{0,18}(?:\.\d{0,2})?$The total amount of discounts.
^-?\d{0,18}(?:\.\d{0,2})?$Show child attributes
Show child attributes
1 - 2506553565535Show child attributes
Show child attributes
curl --request POST \
--url https://{tenant}.api.velocity.medshift.com/integrations/zapier/v1/external_orders/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"line_items": [
{
"quantity": 500000,
"product_variant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"unit_price": "<string>",
"tax_price": "<string>"
}
],
"billing_address": {
"first_name": "<string>",
"last_name": "<string>",
"street_1": "<string>",
"city": "<string>",
"country_iso2": "<string>",
"company": "",
"phone": "",
"street_2": "",
"state_province": "",
"postal_code": ""
},
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"shipping_price": "0.00",
"handling_price": "0.00",
"discount_price": "0.00",
"shipping_address": {
"first_name": "<string>",
"last_name": "<string>",
"street_1": "<string>",
"city": "<string>",
"country_iso2": "<string>",
"company": "",
"phone": "",
"street_2": "",
"state_province": "",
"postal_code": ""
},
"shipping_method": "<string>",
"customer_notes": "<string>",
"staff_notes": "<string>",
"custom_fields": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": null
}
],
"shipping_tax_price": "0.00",
"handling_tax_price": "0.00"
}
'import requests
url = "https://{tenant}.api.velocity.medshift.com/integrations/zapier/v1/external_orders/"
payload = {
"line_items": [
{
"quantity": 500000,
"product_variant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"unit_price": "<string>",
"tax_price": "<string>"
}
],
"billing_address": {
"first_name": "<string>",
"last_name": "<string>",
"street_1": "<string>",
"city": "<string>",
"country_iso2": "<string>",
"company": "",
"phone": "",
"street_2": "",
"state_province": "",
"postal_code": ""
},
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"shipping_price": "0.00",
"handling_price": "0.00",
"discount_price": "0.00",
"shipping_address": {
"first_name": "<string>",
"last_name": "<string>",
"street_1": "<string>",
"city": "<string>",
"country_iso2": "<string>",
"company": "",
"phone": "",
"street_2": "",
"state_province": "",
"postal_code": ""
},
"shipping_method": "<string>",
"customer_notes": "<string>",
"staff_notes": "<string>",
"custom_fields": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": None
}
],
"shipping_tax_price": "0.00",
"handling_tax_price": "0.00"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
line_items: [
{
quantity: 500000,
product_variant_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
unit_price: '<string>',
tax_price: '<string>'
}
],
billing_address: {
first_name: '<string>',
last_name: '<string>',
street_1: '<string>',
city: '<string>',
country_iso2: '<string>',
company: '',
phone: '',
street_2: '',
state_province: '',
postal_code: ''
},
customer_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
created_at: '2023-11-07T05:31:56Z',
shipping_price: '0.00',
handling_price: '0.00',
discount_price: '0.00',
shipping_address: {
first_name: '<string>',
last_name: '<string>',
street_1: '<string>',
city: '<string>',
country_iso2: '<string>',
company: '',
phone: '',
street_2: '',
state_province: '',
postal_code: ''
},
shipping_method: '<string>',
customer_notes: '<string>',
staff_notes: '<string>',
custom_fields: [{id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', value: null}],
shipping_tax_price: '0.00',
handling_tax_price: '0.00'
})
};
fetch('https://{tenant}.api.velocity.medshift.com/integrations/zapier/v1/external_orders/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenant}.api.velocity.medshift.com/integrations/zapier/v1/external_orders/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'line_items' => [
[
'quantity' => 500000,
'product_variant_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'unit_price' => '<string>',
'tax_price' => '<string>'
]
],
'billing_address' => [
'first_name' => '<string>',
'last_name' => '<string>',
'street_1' => '<string>',
'city' => '<string>',
'country_iso2' => '<string>',
'company' => '',
'phone' => '',
'street_2' => '',
'state_province' => '',
'postal_code' => ''
],
'customer_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'created_at' => '2023-11-07T05:31:56Z',
'shipping_price' => '0.00',
'handling_price' => '0.00',
'discount_price' => '0.00',
'shipping_address' => [
'first_name' => '<string>',
'last_name' => '<string>',
'street_1' => '<string>',
'city' => '<string>',
'country_iso2' => '<string>',
'company' => '',
'phone' => '',
'street_2' => '',
'state_province' => '',
'postal_code' => ''
],
'shipping_method' => '<string>',
'customer_notes' => '<string>',
'staff_notes' => '<string>',
'custom_fields' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'value' => null
]
],
'shipping_tax_price' => '0.00',
'handling_tax_price' => '0.00'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.api.velocity.medshift.com/integrations/zapier/v1/external_orders/"
payload := strings.NewReader("{\n \"line_items\": [\n {\n \"quantity\": 500000,\n \"product_variant_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"unit_price\": \"<string>\",\n \"tax_price\": \"<string>\"\n }\n ],\n \"billing_address\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"street_1\": \"<string>\",\n \"city\": \"<string>\",\n \"country_iso2\": \"<string>\",\n \"company\": \"\",\n \"phone\": \"\",\n \"street_2\": \"\",\n \"state_province\": \"\",\n \"postal_code\": \"\"\n },\n \"customer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"shipping_price\": \"0.00\",\n \"handling_price\": \"0.00\",\n \"discount_price\": \"0.00\",\n \"shipping_address\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"street_1\": \"<string>\",\n \"city\": \"<string>\",\n \"country_iso2\": \"<string>\",\n \"company\": \"\",\n \"phone\": \"\",\n \"street_2\": \"\",\n \"state_province\": \"\",\n \"postal_code\": \"\"\n },\n \"shipping_method\": \"<string>\",\n \"customer_notes\": \"<string>\",\n \"staff_notes\": \"<string>\",\n \"custom_fields\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"value\": null\n }\n ],\n \"shipping_tax_price\": \"0.00\",\n \"handling_tax_price\": \"0.00\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{tenant}.api.velocity.medshift.com/integrations/zapier/v1/external_orders/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"line_items\": [\n {\n \"quantity\": 500000,\n \"product_variant_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"unit_price\": \"<string>\",\n \"tax_price\": \"<string>\"\n }\n ],\n \"billing_address\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"street_1\": \"<string>\",\n \"city\": \"<string>\",\n \"country_iso2\": \"<string>\",\n \"company\": \"\",\n \"phone\": \"\",\n \"street_2\": \"\",\n \"state_province\": \"\",\n \"postal_code\": \"\"\n },\n \"customer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"shipping_price\": \"0.00\",\n \"handling_price\": \"0.00\",\n \"discount_price\": \"0.00\",\n \"shipping_address\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"street_1\": \"<string>\",\n \"city\": \"<string>\",\n \"country_iso2\": \"<string>\",\n \"company\": \"\",\n \"phone\": \"\",\n \"street_2\": \"\",\n \"state_province\": \"\",\n \"postal_code\": \"\"\n },\n \"shipping_method\": \"<string>\",\n \"customer_notes\": \"<string>\",\n \"staff_notes\": \"<string>\",\n \"custom_fields\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"value\": null\n }\n ],\n \"shipping_tax_price\": \"0.00\",\n \"handling_tax_price\": \"0.00\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.api.velocity.medshift.com/integrations/zapier/v1/external_orders/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"line_items\": [\n {\n \"quantity\": 500000,\n \"product_variant_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"unit_price\": \"<string>\",\n \"tax_price\": \"<string>\"\n }\n ],\n \"billing_address\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"street_1\": \"<string>\",\n \"city\": \"<string>\",\n \"country_iso2\": \"<string>\",\n \"company\": \"\",\n \"phone\": \"\",\n \"street_2\": \"\",\n \"state_province\": \"\",\n \"postal_code\": \"\"\n },\n \"customer_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"shipping_price\": \"0.00\",\n \"handling_price\": \"0.00\",\n \"discount_price\": \"0.00\",\n \"shipping_address\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"street_1\": \"<string>\",\n \"city\": \"<string>\",\n \"country_iso2\": \"<string>\",\n \"company\": \"\",\n \"phone\": \"\",\n \"street_2\": \"\",\n \"state_province\": \"\",\n \"postal_code\": \"\"\n },\n \"shipping_method\": \"<string>\",\n \"customer_notes\": \"<string>\",\n \"staff_notes\": \"<string>\",\n \"custom_fields\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"value\": null\n }\n ],\n \"shipping_tax_price\": \"0.00\",\n \"handling_tax_price\": \"0.00\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bigcommerce_id": 123,
"is_external": true,
"is_archived": true,
"archived_at": "2023-11-07T05:31:56Z",
"customer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bigcommerce_id": 123,
"first_name": "<string>",
"last_name": "<string>",
"company_name": "<string>",
"email": "jsmith@example.com",
"phone": "<string>"
},
"created_by": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "jsmith@example.com",
"picture": "<string>"
},
"bigcommerce_status": "<string>",
"is_approved": true,
"approved_at": "2023-11-07T05:31:56Z",
"approved_by": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"email": "jsmith@example.com",
"picture": "<string>"
},
"subtotal_price": "<string>",
"tax_price": "<string>",
"total_price": "<string>",
"store_credit": "<string>",
"payment": {
"online": {
"stripe_payment_intent_id": "<string>"
},
"terms": {
"due_date": "2023-12-25",
"is_capital": true,
"outstanding_balance": "<string>"
}
},
"coupons": [
{
"bigcommerce_coupon_id": 123,
"code": "<string>",
"discount_price": "<string>"
}
],
"is_digital": true,
"line_items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bigcommerce_id": 123,
"sku": "<string>",
"type": "<string>",
"quantity": 500000,
"total_price": "<string>",
"subtotal_price": "<string>",
"total_tax_price": "<string>",
"discount_price": "<string>",
"options": [
{
"display_name": "<string>",
"display_value": "<string>"
}
],
"name": "<string>",
"unit_price": "<string>",
"tax_price": "<string>"
}
],
"billing_address": {
"first_name": "<string>",
"last_name": "<string>",
"street_1": "<string>",
"city": "<string>",
"country_iso2": "<string>",
"company": "",
"phone": "",
"street_2": "",
"state_province": "",
"postal_code": ""
},
"subscription": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"created_at": "2023-11-07T05:31:56Z",
"shipping_price": "0.00",
"handling_price": "0.00",
"discount_price": "0.00",
"shipping_address": {
"first_name": "<string>",
"last_name": "<string>",
"street_1": "<string>",
"city": "<string>",
"country_iso2": "<string>",
"company": "",
"phone": "",
"street_2": "",
"state_province": "",
"postal_code": ""
},
"shipping_method": "<string>",
"customer_notes": "<string>",
"staff_notes": "<string>",
"custom_fields": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"value": null
}
]
}
