Shipwire Receivings API
POST
Cancel a receiving label
{{baseUrl}}/api/v3/receivings/:id/labels/cancel
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v3/receivings/:id/labels/cancel");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/v3/receivings/:id/labels/cancel")
require "http/client"
url = "{{baseUrl}}/api/v3/receivings/:id/labels/cancel"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/api/v3/receivings/:id/labels/cancel"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v3/receivings/:id/labels/cancel");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v3/receivings/:id/labels/cancel"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/api/v3/receivings/:id/labels/cancel HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/v3/receivings/:id/labels/cancel")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v3/receivings/:id/labels/cancel"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v3/receivings/:id/labels/cancel")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/v3/receivings/:id/labels/cancel")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/api/v3/receivings/:id/labels/cancel');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v3/receivings/:id/labels/cancel'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v3/receivings/:id/labels/cancel';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/api/v3/receivings/:id/labels/cancel',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v3/receivings/:id/labels/cancel")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v3/receivings/:id/labels/cancel',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v3/receivings/:id/labels/cancel'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/api/v3/receivings/:id/labels/cancel');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v3/receivings/:id/labels/cancel'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v3/receivings/:id/labels/cancel';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v3/receivings/:id/labels/cancel"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/api/v3/receivings/:id/labels/cancel" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v3/receivings/:id/labels/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/api/v3/receivings/:id/labels/cancel');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v3/receivings/:id/labels/cancel');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v3/receivings/:id/labels/cancel');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v3/receivings/:id/labels/cancel' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v3/receivings/:id/labels/cancel' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/api/v3/receivings/:id/labels/cancel")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v3/receivings/:id/labels/cancel"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v3/receivings/:id/labels/cancel"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v3/receivings/:id/labels/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/api/v3/receivings/:id/labels/cancel') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v3/receivings/:id/labels/cancel";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/api/v3/receivings/:id/labels/cancel
http POST {{baseUrl}}/api/v3/receivings/:id/labels/cancel
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/api/v3/receivings/:id/labels/cancel
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v3/receivings/:id/labels/cancel")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"status": 200,
"resourceLocation": null,
"message": "Labels cancelled"
}
POST
Cancel a receiving order
{{baseUrl}}/api/v3/receivings/:id/cancel
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v3/receivings/:id/cancel");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/v3/receivings/:id/cancel")
require "http/client"
url = "{{baseUrl}}/api/v3/receivings/:id/cancel"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/api/v3/receivings/:id/cancel"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v3/receivings/:id/cancel");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v3/receivings/:id/cancel"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/api/v3/receivings/:id/cancel HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/v3/receivings/:id/cancel")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v3/receivings/:id/cancel"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v3/receivings/:id/cancel")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/v3/receivings/:id/cancel")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/api/v3/receivings/:id/cancel');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v3/receivings/:id/cancel'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v3/receivings/:id/cancel';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/api/v3/receivings/:id/cancel',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v3/receivings/:id/cancel")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v3/receivings/:id/cancel',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v3/receivings/:id/cancel'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/api/v3/receivings/:id/cancel');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v3/receivings/:id/cancel'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v3/receivings/:id/cancel';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v3/receivings/:id/cancel"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/api/v3/receivings/:id/cancel" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v3/receivings/:id/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/api/v3/receivings/:id/cancel');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v3/receivings/:id/cancel');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v3/receivings/:id/cancel');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v3/receivings/:id/cancel' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v3/receivings/:id/cancel' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/api/v3/receivings/:id/cancel")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v3/receivings/:id/cancel"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v3/receivings/:id/cancel"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v3/receivings/:id/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/api/v3/receivings/:id/cancel') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v3/receivings/:id/cancel";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/api/v3/receivings/:id/cancel
http POST {{baseUrl}}/api/v3/receivings/:id/cancel
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/api/v3/receivings/:id/cancel
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v3/receivings/:id/cancel")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"status": 200,
"resourceLocation": null,
"message": "Receiving was cancelled"
}
POST
Create an advance ship notice
{{baseUrl}}/api/v3/receivings
BODY json
{
"externalId": "",
"orderNo": "",
"expectedDate": "",
"options": {
"warehouseExternalId": "",
"warehouseId": 0,
"warehouseRegion": "",
"doNotSendEmail": 0
},
"arrangement": {
"contact": "",
"phone": "",
"type": ""
},
"shipments": {
"shipmentId": 0,
"type": "",
"height": "",
"length": "",
"weight": "",
"width": ""
},
"labels": {
"labelId": 0,
"orderId": 0,
"orderExternalId": ""
},
"trackings": [
{
"id": 0,
"orderId": 0,
"orderExternalId": "",
"tracking": "",
"carrier": "",
"contact": "",
"phone": "",
"url": "",
"summary": "",
"summaryDate": "",
"trackedDate": "",
"delivered1Date": "",
"firstScanDate": "",
"labelCreationDate": ""
}
],
"items": [
{
"sku": "",
"quantity": 0,
"id": 0,
"productId": 0,
"productExternalId": "",
"orderId": 0,
"orderExternalId": "",
"expected": 0,
"pending": 0,
"good": 0,
"inReview": 0,
"damaged": 0
}
],
"shipFrom": {
"email": "",
"name": "",
"address1": "",
"address2": "",
"address3": "",
"city": "",
"state": "",
"postalCode": "",
"country": "",
"phone": ""
},
"instructionsRecipients": [
{
"email": "",
"name": "",
"note": ""
}
],
"extendedAttributes": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v3/receivings");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"externalId\": \"ClientID123456\",\n \"orderNo\": \"foobar1\",\n \"expectedDate\": \"2014-05-27T07:00:00.000Z\",\n \"options\": {\n \"warehouseExternalId\": \"Warehouse Id for this order on client platform\",\n \"warehouseId\": 7,\n \"warehouseRegion\": \"UK\",\n \"doNotSendEmail\": 1\n },\n \"arrangement\": {\n \"contact\": \"Andrew Carr\",\n \"phone\": \"7822878787\",\n \"type\": \"none\"\n },\n \"shipments\": {\n \"shipmentId\": 12,\n \"type\": \"box\",\n \"height\": 12,\n \"length\": 2.99,\n \"weight\": 1.2,\n \"width\": 12\n },\n \"labels\": {\n \"labelId\": 1,\n \"orderId\": 8411,\n \"orderExternalId\": \"ORD00101\"\n },\n \"shipFrom\": {\n \"email\": \"shipping@wesellem.com\",\n \"name\": \"Stephen Alexander\",\n \"address1\": \"11 Prsilla St\",\n \"address2\": \"Apt 10\",\n \"address3\": null,\n \"city\": \"Schenectady\",\n \"state\": \"NY\",\n \"postalCode\": \"12345\",\n \"country\": \"United States\",\n \"phone\": \"1234567890\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/v3/receivings" {:content-type :json
:form-params {:externalId "ClientID123456"
:orderNo "foobar1"
:expectedDate "2014-05-27T07:00:00.000Z"
:options {:warehouseExternalId "Warehouse Id for this order on client platform"
:warehouseId 7
:warehouseRegion "UK"
:doNotSendEmail 1}
:arrangement {:contact "Andrew Carr"
:phone "7822878787"
:type "none"}
:shipments {:shipmentId 12
:type "box"
:height 12
:length 2.99
:weight 1.2
:width 12}
:labels {:labelId 1
:orderId 8411
:orderExternalId "ORD00101"}
:shipFrom {:email "shipping@wesellem.com"
:name "Stephen Alexander"
:address1 "11 Prsilla St"
:address2 "Apt 10"
:address3 nil
:city "Schenectady"
:state "NY"
:postalCode "12345"
:country "United States"
:phone "1234567890"}}})
require "http/client"
url = "{{baseUrl}}/api/v3/receivings"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"externalId\": \"ClientID123456\",\n \"orderNo\": \"foobar1\",\n \"expectedDate\": \"2014-05-27T07:00:00.000Z\",\n \"options\": {\n \"warehouseExternalId\": \"Warehouse Id for this order on client platform\",\n \"warehouseId\": 7,\n \"warehouseRegion\": \"UK\",\n \"doNotSendEmail\": 1\n },\n \"arrangement\": {\n \"contact\": \"Andrew Carr\",\n \"phone\": \"7822878787\",\n \"type\": \"none\"\n },\n \"shipments\": {\n \"shipmentId\": 12,\n \"type\": \"box\",\n \"height\": 12,\n \"length\": 2.99,\n \"weight\": 1.2,\n \"width\": 12\n },\n \"labels\": {\n \"labelId\": 1,\n \"orderId\": 8411,\n \"orderExternalId\": \"ORD00101\"\n },\n \"shipFrom\": {\n \"email\": \"shipping@wesellem.com\",\n \"name\": \"Stephen Alexander\",\n \"address1\": \"11 Prsilla St\",\n \"address2\": \"Apt 10\",\n \"address3\": null,\n \"city\": \"Schenectady\",\n \"state\": \"NY\",\n \"postalCode\": \"12345\",\n \"country\": \"United States\",\n \"phone\": \"1234567890\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/api/v3/receivings"),
Content = new StringContent("{\n \"externalId\": \"ClientID123456\",\n \"orderNo\": \"foobar1\",\n \"expectedDate\": \"2014-05-27T07:00:00.000Z\",\n \"options\": {\n \"warehouseExternalId\": \"Warehouse Id for this order on client platform\",\n \"warehouseId\": 7,\n \"warehouseRegion\": \"UK\",\n \"doNotSendEmail\": 1\n },\n \"arrangement\": {\n \"contact\": \"Andrew Carr\",\n \"phone\": \"7822878787\",\n \"type\": \"none\"\n },\n \"shipments\": {\n \"shipmentId\": 12,\n \"type\": \"box\",\n \"height\": 12,\n \"length\": 2.99,\n \"weight\": 1.2,\n \"width\": 12\n },\n \"labels\": {\n \"labelId\": 1,\n \"orderId\": 8411,\n \"orderExternalId\": \"ORD00101\"\n },\n \"shipFrom\": {\n \"email\": \"shipping@wesellem.com\",\n \"name\": \"Stephen Alexander\",\n \"address1\": \"11 Prsilla St\",\n \"address2\": \"Apt 10\",\n \"address3\": null,\n \"city\": \"Schenectady\",\n \"state\": \"NY\",\n \"postalCode\": \"12345\",\n \"country\": \"United States\",\n \"phone\": \"1234567890\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v3/receivings");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"externalId\": \"ClientID123456\",\n \"orderNo\": \"foobar1\",\n \"expectedDate\": \"2014-05-27T07:00:00.000Z\",\n \"options\": {\n \"warehouseExternalId\": \"Warehouse Id for this order on client platform\",\n \"warehouseId\": 7,\n \"warehouseRegion\": \"UK\",\n \"doNotSendEmail\": 1\n },\n \"arrangement\": {\n \"contact\": \"Andrew Carr\",\n \"phone\": \"7822878787\",\n \"type\": \"none\"\n },\n \"shipments\": {\n \"shipmentId\": 12,\n \"type\": \"box\",\n \"height\": 12,\n \"length\": 2.99,\n \"weight\": 1.2,\n \"width\": 12\n },\n \"labels\": {\n \"labelId\": 1,\n \"orderId\": 8411,\n \"orderExternalId\": \"ORD00101\"\n },\n \"shipFrom\": {\n \"email\": \"shipping@wesellem.com\",\n \"name\": \"Stephen Alexander\",\n \"address1\": \"11 Prsilla St\",\n \"address2\": \"Apt 10\",\n \"address3\": null,\n \"city\": \"Schenectady\",\n \"state\": \"NY\",\n \"postalCode\": \"12345\",\n \"country\": \"United States\",\n \"phone\": \"1234567890\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v3/receivings"
payload := strings.NewReader("{\n \"externalId\": \"ClientID123456\",\n \"orderNo\": \"foobar1\",\n \"expectedDate\": \"2014-05-27T07:00:00.000Z\",\n \"options\": {\n \"warehouseExternalId\": \"Warehouse Id for this order on client platform\",\n \"warehouseId\": 7,\n \"warehouseRegion\": \"UK\",\n \"doNotSendEmail\": 1\n },\n \"arrangement\": {\n \"contact\": \"Andrew Carr\",\n \"phone\": \"7822878787\",\n \"type\": \"none\"\n },\n \"shipments\": {\n \"shipmentId\": 12,\n \"type\": \"box\",\n \"height\": 12,\n \"length\": 2.99,\n \"weight\": 1.2,\n \"width\": 12\n },\n \"labels\": {\n \"labelId\": 1,\n \"orderId\": 8411,\n \"orderExternalId\": \"ORD00101\"\n },\n \"shipFrom\": {\n \"email\": \"shipping@wesellem.com\",\n \"name\": \"Stephen Alexander\",\n \"address1\": \"11 Prsilla St\",\n \"address2\": \"Apt 10\",\n \"address3\": null,\n \"city\": \"Schenectady\",\n \"state\": \"NY\",\n \"postalCode\": \"12345\",\n \"country\": \"United States\",\n \"phone\": \"1234567890\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/api/v3/receivings HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 910
{
"externalId": "ClientID123456",
"orderNo": "foobar1",
"expectedDate": "2014-05-27T07:00:00.000Z",
"options": {
"warehouseExternalId": "Warehouse Id for this order on client platform",
"warehouseId": 7,
"warehouseRegion": "UK",
"doNotSendEmail": 1
},
"arrangement": {
"contact": "Andrew Carr",
"phone": "7822878787",
"type": "none"
},
"shipments": {
"shipmentId": 12,
"type": "box",
"height": 12,
"length": 2.99,
"weight": 1.2,
"width": 12
},
"labels": {
"labelId": 1,
"orderId": 8411,
"orderExternalId": "ORD00101"
},
"shipFrom": {
"email": "shipping@wesellem.com",
"name": "Stephen Alexander",
"address1": "11 Prsilla St",
"address2": "Apt 10",
"address3": null,
"city": "Schenectady",
"state": "NY",
"postalCode": "12345",
"country": "United States",
"phone": "1234567890"
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/v3/receivings")
.setHeader("content-type", "application/json")
.setBody("{\n \"externalId\": \"ClientID123456\",\n \"orderNo\": \"foobar1\",\n \"expectedDate\": \"2014-05-27T07:00:00.000Z\",\n \"options\": {\n \"warehouseExternalId\": \"Warehouse Id for this order on client platform\",\n \"warehouseId\": 7,\n \"warehouseRegion\": \"UK\",\n \"doNotSendEmail\": 1\n },\n \"arrangement\": {\n \"contact\": \"Andrew Carr\",\n \"phone\": \"7822878787\",\n \"type\": \"none\"\n },\n \"shipments\": {\n \"shipmentId\": 12,\n \"type\": \"box\",\n \"height\": 12,\n \"length\": 2.99,\n \"weight\": 1.2,\n \"width\": 12\n },\n \"labels\": {\n \"labelId\": 1,\n \"orderId\": 8411,\n \"orderExternalId\": \"ORD00101\"\n },\n \"shipFrom\": {\n \"email\": \"shipping@wesellem.com\",\n \"name\": \"Stephen Alexander\",\n \"address1\": \"11 Prsilla St\",\n \"address2\": \"Apt 10\",\n \"address3\": null,\n \"city\": \"Schenectady\",\n \"state\": \"NY\",\n \"postalCode\": \"12345\",\n \"country\": \"United States\",\n \"phone\": \"1234567890\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v3/receivings"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"externalId\": \"ClientID123456\",\n \"orderNo\": \"foobar1\",\n \"expectedDate\": \"2014-05-27T07:00:00.000Z\",\n \"options\": {\n \"warehouseExternalId\": \"Warehouse Id for this order on client platform\",\n \"warehouseId\": 7,\n \"warehouseRegion\": \"UK\",\n \"doNotSendEmail\": 1\n },\n \"arrangement\": {\n \"contact\": \"Andrew Carr\",\n \"phone\": \"7822878787\",\n \"type\": \"none\"\n },\n \"shipments\": {\n \"shipmentId\": 12,\n \"type\": \"box\",\n \"height\": 12,\n \"length\": 2.99,\n \"weight\": 1.2,\n \"width\": 12\n },\n \"labels\": {\n \"labelId\": 1,\n \"orderId\": 8411,\n \"orderExternalId\": \"ORD00101\"\n },\n \"shipFrom\": {\n \"email\": \"shipping@wesellem.com\",\n \"name\": \"Stephen Alexander\",\n \"address1\": \"11 Prsilla St\",\n \"address2\": \"Apt 10\",\n \"address3\": null,\n \"city\": \"Schenectady\",\n \"state\": \"NY\",\n \"postalCode\": \"12345\",\n \"country\": \"United States\",\n \"phone\": \"1234567890\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"externalId\": \"ClientID123456\",\n \"orderNo\": \"foobar1\",\n \"expectedDate\": \"2014-05-27T07:00:00.000Z\",\n \"options\": {\n \"warehouseExternalId\": \"Warehouse Id for this order on client platform\",\n \"warehouseId\": 7,\n \"warehouseRegion\": \"UK\",\n \"doNotSendEmail\": 1\n },\n \"arrangement\": {\n \"contact\": \"Andrew Carr\",\n \"phone\": \"7822878787\",\n \"type\": \"none\"\n },\n \"shipments\": {\n \"shipmentId\": 12,\n \"type\": \"box\",\n \"height\": 12,\n \"length\": 2.99,\n \"weight\": 1.2,\n \"width\": 12\n },\n \"labels\": {\n \"labelId\": 1,\n \"orderId\": 8411,\n \"orderExternalId\": \"ORD00101\"\n },\n \"shipFrom\": {\n \"email\": \"shipping@wesellem.com\",\n \"name\": \"Stephen Alexander\",\n \"address1\": \"11 Prsilla St\",\n \"address2\": \"Apt 10\",\n \"address3\": null,\n \"city\": \"Schenectady\",\n \"state\": \"NY\",\n \"postalCode\": \"12345\",\n \"country\": \"United States\",\n \"phone\": \"1234567890\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v3/receivings")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/v3/receivings")
.header("content-type", "application/json")
.body("{\n \"externalId\": \"ClientID123456\",\n \"orderNo\": \"foobar1\",\n \"expectedDate\": \"2014-05-27T07:00:00.000Z\",\n \"options\": {\n \"warehouseExternalId\": \"Warehouse Id for this order on client platform\",\n \"warehouseId\": 7,\n \"warehouseRegion\": \"UK\",\n \"doNotSendEmail\": 1\n },\n \"arrangement\": {\n \"contact\": \"Andrew Carr\",\n \"phone\": \"7822878787\",\n \"type\": \"none\"\n },\n \"shipments\": {\n \"shipmentId\": 12,\n \"type\": \"box\",\n \"height\": 12,\n \"length\": 2.99,\n \"weight\": 1.2,\n \"width\": 12\n },\n \"labels\": {\n \"labelId\": 1,\n \"orderId\": 8411,\n \"orderExternalId\": \"ORD00101\"\n },\n \"shipFrom\": {\n \"email\": \"shipping@wesellem.com\",\n \"name\": \"Stephen Alexander\",\n \"address1\": \"11 Prsilla St\",\n \"address2\": \"Apt 10\",\n \"address3\": null,\n \"city\": \"Schenectady\",\n \"state\": \"NY\",\n \"postalCode\": \"12345\",\n \"country\": \"United States\",\n \"phone\": \"1234567890\"\n }\n}")
.asString();
const data = JSON.stringify({
externalId: 'ClientID123456',
orderNo: 'foobar1',
expectedDate: '2014-05-27T07:00:00.000Z',
options: {
warehouseExternalId: 'Warehouse Id for this order on client platform',
warehouseId: 7,
warehouseRegion: 'UK',
doNotSendEmail: 1
},
arrangement: {
contact: 'Andrew Carr',
phone: '7822878787',
type: 'none'
},
shipments: {
shipmentId: 12,
type: 'box',
height: 12,
length: 2.99,
weight: 1.2,
width: 12
},
labels: {
labelId: 1,
orderId: 8411,
orderExternalId: 'ORD00101'
},
shipFrom: {
email: 'shipping@wesellem.com',
name: 'Stephen Alexander',
address1: '11 Prsilla St',
address2: 'Apt 10',
address3: null,
city: 'Schenectady',
state: 'NY',
postalCode: '12345',
country: 'United States',
phone: '1234567890'
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/api/v3/receivings');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v3/receivings',
headers: {'content-type': 'application/json'},
data: {
externalId: 'ClientID123456',
orderNo: 'foobar1',
expectedDate: '2014-05-27T07:00:00.000Z',
options: {
warehouseExternalId: 'Warehouse Id for this order on client platform',
warehouseId: 7,
warehouseRegion: 'UK',
doNotSendEmail: 1
},
arrangement: {contact: 'Andrew Carr', phone: '7822878787', type: 'none'},
shipments: {shipmentId: 12, type: 'box', height: 12, length: 2.99, weight: 1.2, width: 12},
labels: {labelId: 1, orderId: 8411, orderExternalId: 'ORD00101'},
shipFrom: {
email: 'shipping@wesellem.com',
name: 'Stephen Alexander',
address1: '11 Prsilla St',
address2: 'Apt 10',
address3: null,
city: 'Schenectady',
state: 'NY',
postalCode: '12345',
country: 'United States',
phone: '1234567890'
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v3/receivings';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"externalId":"ClientID123456","orderNo":"foobar1","expectedDate":"2014-05-27T07:00:00.000Z","options":{"warehouseExternalId":"Warehouse Id for this order on client platform","warehouseId":7,"warehouseRegion":"UK","doNotSendEmail":1},"arrangement":{"contact":"Andrew Carr","phone":"7822878787","type":"none"},"shipments":{"shipmentId":12,"type":"box","height":12,"length":2.99,"weight":1.2,"width":12},"labels":{"labelId":1,"orderId":8411,"orderExternalId":"ORD00101"},"shipFrom":{"email":"shipping@wesellem.com","name":"Stephen Alexander","address1":"11 Prsilla St","address2":"Apt 10","address3":null,"city":"Schenectady","state":"NY","postalCode":"12345","country":"United States","phone":"1234567890"}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/api/v3/receivings',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "externalId": "ClientID123456",\n "orderNo": "foobar1",\n "expectedDate": "2014-05-27T07:00:00.000Z",\n "options": {\n "warehouseExternalId": "Warehouse Id for this order on client platform",\n "warehouseId": 7,\n "warehouseRegion": "UK",\n "doNotSendEmail": 1\n },\n "arrangement": {\n "contact": "Andrew Carr",\n "phone": "7822878787",\n "type": "none"\n },\n "shipments": {\n "shipmentId": 12,\n "type": "box",\n "height": 12,\n "length": 2.99,\n "weight": 1.2,\n "width": 12\n },\n "labels": {\n "labelId": 1,\n "orderId": 8411,\n "orderExternalId": "ORD00101"\n },\n "shipFrom": {\n "email": "shipping@wesellem.com",\n "name": "Stephen Alexander",\n "address1": "11 Prsilla St",\n "address2": "Apt 10",\n "address3": null,\n "city": "Schenectady",\n "state": "NY",\n "postalCode": "12345",\n "country": "United States",\n "phone": "1234567890"\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"externalId\": \"ClientID123456\",\n \"orderNo\": \"foobar1\",\n \"expectedDate\": \"2014-05-27T07:00:00.000Z\",\n \"options\": {\n \"warehouseExternalId\": \"Warehouse Id for this order on client platform\",\n \"warehouseId\": 7,\n \"warehouseRegion\": \"UK\",\n \"doNotSendEmail\": 1\n },\n \"arrangement\": {\n \"contact\": \"Andrew Carr\",\n \"phone\": \"7822878787\",\n \"type\": \"none\"\n },\n \"shipments\": {\n \"shipmentId\": 12,\n \"type\": \"box\",\n \"height\": 12,\n \"length\": 2.99,\n \"weight\": 1.2,\n \"width\": 12\n },\n \"labels\": {\n \"labelId\": 1,\n \"orderId\": 8411,\n \"orderExternalId\": \"ORD00101\"\n },\n \"shipFrom\": {\n \"email\": \"shipping@wesellem.com\",\n \"name\": \"Stephen Alexander\",\n \"address1\": \"11 Prsilla St\",\n \"address2\": \"Apt 10\",\n \"address3\": null,\n \"city\": \"Schenectady\",\n \"state\": \"NY\",\n \"postalCode\": \"12345\",\n \"country\": \"United States\",\n \"phone\": \"1234567890\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/v3/receivings")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v3/receivings',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
externalId: 'ClientID123456',
orderNo: 'foobar1',
expectedDate: '2014-05-27T07:00:00.000Z',
options: {
warehouseExternalId: 'Warehouse Id for this order on client platform',
warehouseId: 7,
warehouseRegion: 'UK',
doNotSendEmail: 1
},
arrangement: {contact: 'Andrew Carr', phone: '7822878787', type: 'none'},
shipments: {shipmentId: 12, type: 'box', height: 12, length: 2.99, weight: 1.2, width: 12},
labels: {labelId: 1, orderId: 8411, orderExternalId: 'ORD00101'},
shipFrom: {
email: 'shipping@wesellem.com',
name: 'Stephen Alexander',
address1: '11 Prsilla St',
address2: 'Apt 10',
address3: null,
city: 'Schenectady',
state: 'NY',
postalCode: '12345',
country: 'United States',
phone: '1234567890'
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v3/receivings',
headers: {'content-type': 'application/json'},
body: {
externalId: 'ClientID123456',
orderNo: 'foobar1',
expectedDate: '2014-05-27T07:00:00.000Z',
options: {
warehouseExternalId: 'Warehouse Id for this order on client platform',
warehouseId: 7,
warehouseRegion: 'UK',
doNotSendEmail: 1
},
arrangement: {contact: 'Andrew Carr', phone: '7822878787', type: 'none'},
shipments: {shipmentId: 12, type: 'box', height: 12, length: 2.99, weight: 1.2, width: 12},
labels: {labelId: 1, orderId: 8411, orderExternalId: 'ORD00101'},
shipFrom: {
email: 'shipping@wesellem.com',
name: 'Stephen Alexander',
address1: '11 Prsilla St',
address2: 'Apt 10',
address3: null,
city: 'Schenectady',
state: 'NY',
postalCode: '12345',
country: 'United States',
phone: '1234567890'
}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/api/v3/receivings');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
externalId: 'ClientID123456',
orderNo: 'foobar1',
expectedDate: '2014-05-27T07:00:00.000Z',
options: {
warehouseExternalId: 'Warehouse Id for this order on client platform',
warehouseId: 7,
warehouseRegion: 'UK',
doNotSendEmail: 1
},
arrangement: {
contact: 'Andrew Carr',
phone: '7822878787',
type: 'none'
},
shipments: {
shipmentId: 12,
type: 'box',
height: 12,
length: 2.99,
weight: 1.2,
width: 12
},
labels: {
labelId: 1,
orderId: 8411,
orderExternalId: 'ORD00101'
},
shipFrom: {
email: 'shipping@wesellem.com',
name: 'Stephen Alexander',
address1: '11 Prsilla St',
address2: 'Apt 10',
address3: null,
city: 'Schenectady',
state: 'NY',
postalCode: '12345',
country: 'United States',
phone: '1234567890'
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v3/receivings',
headers: {'content-type': 'application/json'},
data: {
externalId: 'ClientID123456',
orderNo: 'foobar1',
expectedDate: '2014-05-27T07:00:00.000Z',
options: {
warehouseExternalId: 'Warehouse Id for this order on client platform',
warehouseId: 7,
warehouseRegion: 'UK',
doNotSendEmail: 1
},
arrangement: {contact: 'Andrew Carr', phone: '7822878787', type: 'none'},
shipments: {shipmentId: 12, type: 'box', height: 12, length: 2.99, weight: 1.2, width: 12},
labels: {labelId: 1, orderId: 8411, orderExternalId: 'ORD00101'},
shipFrom: {
email: 'shipping@wesellem.com',
name: 'Stephen Alexander',
address1: '11 Prsilla St',
address2: 'Apt 10',
address3: null,
city: 'Schenectady',
state: 'NY',
postalCode: '12345',
country: 'United States',
phone: '1234567890'
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v3/receivings';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"externalId":"ClientID123456","orderNo":"foobar1","expectedDate":"2014-05-27T07:00:00.000Z","options":{"warehouseExternalId":"Warehouse Id for this order on client platform","warehouseId":7,"warehouseRegion":"UK","doNotSendEmail":1},"arrangement":{"contact":"Andrew Carr","phone":"7822878787","type":"none"},"shipments":{"shipmentId":12,"type":"box","height":12,"length":2.99,"weight":1.2,"width":12},"labels":{"labelId":1,"orderId":8411,"orderExternalId":"ORD00101"},"shipFrom":{"email":"shipping@wesellem.com","name":"Stephen Alexander","address1":"11 Prsilla St","address2":"Apt 10","address3":null,"city":"Schenectady","state":"NY","postalCode":"12345","country":"United States","phone":"1234567890"}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"externalId": @"ClientID123456",
@"orderNo": @"foobar1",
@"expectedDate": @"2014-05-27T07:00:00.000Z",
@"options": @{ @"warehouseExternalId": @"Warehouse Id for this order on client platform", @"warehouseId": @7, @"warehouseRegion": @"UK", @"doNotSendEmail": @1 },
@"arrangement": @{ @"contact": @"Andrew Carr", @"phone": @"7822878787", @"type": @"none" },
@"shipments": @{ @"shipmentId": @12, @"type": @"box", @"height": @12, @"length": @2.99, @"weight": @1.2, @"width": @12 },
@"labels": @{ @"labelId": @1, @"orderId": @8411, @"orderExternalId": @"ORD00101" },
@"shipFrom": @{ @"email": @"shipping@wesellem.com", @"name": @"Stephen Alexander", @"address1": @"11 Prsilla St", @"address2": @"Apt 10", @"address3": , @"city": @"Schenectady", @"state": @"NY", @"postalCode": @"12345", @"country": @"United States", @"phone": @"1234567890" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v3/receivings"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/api/v3/receivings" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"externalId\": \"ClientID123456\",\n \"orderNo\": \"foobar1\",\n \"expectedDate\": \"2014-05-27T07:00:00.000Z\",\n \"options\": {\n \"warehouseExternalId\": \"Warehouse Id for this order on client platform\",\n \"warehouseId\": 7,\n \"warehouseRegion\": \"UK\",\n \"doNotSendEmail\": 1\n },\n \"arrangement\": {\n \"contact\": \"Andrew Carr\",\n \"phone\": \"7822878787\",\n \"type\": \"none\"\n },\n \"shipments\": {\n \"shipmentId\": 12,\n \"type\": \"box\",\n \"height\": 12,\n \"length\": 2.99,\n \"weight\": 1.2,\n \"width\": 12\n },\n \"labels\": {\n \"labelId\": 1,\n \"orderId\": 8411,\n \"orderExternalId\": \"ORD00101\"\n },\n \"shipFrom\": {\n \"email\": \"shipping@wesellem.com\",\n \"name\": \"Stephen Alexander\",\n \"address1\": \"11 Prsilla St\",\n \"address2\": \"Apt 10\",\n \"address3\": null,\n \"city\": \"Schenectady\",\n \"state\": \"NY\",\n \"postalCode\": \"12345\",\n \"country\": \"United States\",\n \"phone\": \"1234567890\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v3/receivings",
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([
'externalId' => 'ClientID123456',
'orderNo' => 'foobar1',
'expectedDate' => '2014-05-27T07:00:00.000Z',
'options' => [
'warehouseExternalId' => 'Warehouse Id for this order on client platform',
'warehouseId' => 7,
'warehouseRegion' => 'UK',
'doNotSendEmail' => 1
],
'arrangement' => [
'contact' => 'Andrew Carr',
'phone' => '7822878787',
'type' => 'none'
],
'shipments' => [
'shipmentId' => 12,
'type' => 'box',
'height' => 12,
'length' => 2.99,
'weight' => 1.2,
'width' => 12
],
'labels' => [
'labelId' => 1,
'orderId' => 8411,
'orderExternalId' => 'ORD00101'
],
'shipFrom' => [
'email' => 'shipping@wesellem.com',
'name' => 'Stephen Alexander',
'address1' => '11 Prsilla St',
'address2' => 'Apt 10',
'address3' => null,
'city' => 'Schenectady',
'state' => 'NY',
'postalCode' => '12345',
'country' => 'United States',
'phone' => '1234567890'
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/api/v3/receivings', [
'body' => '{
"externalId": "ClientID123456",
"orderNo": "foobar1",
"expectedDate": "2014-05-27T07:00:00.000Z",
"options": {
"warehouseExternalId": "Warehouse Id for this order on client platform",
"warehouseId": 7,
"warehouseRegion": "UK",
"doNotSendEmail": 1
},
"arrangement": {
"contact": "Andrew Carr",
"phone": "7822878787",
"type": "none"
},
"shipments": {
"shipmentId": 12,
"type": "box",
"height": 12,
"length": 2.99,
"weight": 1.2,
"width": 12
},
"labels": {
"labelId": 1,
"orderId": 8411,
"orderExternalId": "ORD00101"
},
"shipFrom": {
"email": "shipping@wesellem.com",
"name": "Stephen Alexander",
"address1": "11 Prsilla St",
"address2": "Apt 10",
"address3": null,
"city": "Schenectady",
"state": "NY",
"postalCode": "12345",
"country": "United States",
"phone": "1234567890"
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/v3/receivings');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'externalId' => 'ClientID123456',
'orderNo' => 'foobar1',
'expectedDate' => '2014-05-27T07:00:00.000Z',
'options' => [
'warehouseExternalId' => 'Warehouse Id for this order on client platform',
'warehouseId' => 7,
'warehouseRegion' => 'UK',
'doNotSendEmail' => 1
],
'arrangement' => [
'contact' => 'Andrew Carr',
'phone' => '7822878787',
'type' => 'none'
],
'shipments' => [
'shipmentId' => 12,
'type' => 'box',
'height' => 12,
'length' => 2.99,
'weight' => 1.2,
'width' => 12
],
'labels' => [
'labelId' => 1,
'orderId' => 8411,
'orderExternalId' => 'ORD00101'
],
'shipFrom' => [
'email' => 'shipping@wesellem.com',
'name' => 'Stephen Alexander',
'address1' => '11 Prsilla St',
'address2' => 'Apt 10',
'address3' => null,
'city' => 'Schenectady',
'state' => 'NY',
'postalCode' => '12345',
'country' => 'United States',
'phone' => '1234567890'
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'externalId' => 'ClientID123456',
'orderNo' => 'foobar1',
'expectedDate' => '2014-05-27T07:00:00.000Z',
'options' => [
'warehouseExternalId' => 'Warehouse Id for this order on client platform',
'warehouseId' => 7,
'warehouseRegion' => 'UK',
'doNotSendEmail' => 1
],
'arrangement' => [
'contact' => 'Andrew Carr',
'phone' => '7822878787',
'type' => 'none'
],
'shipments' => [
'shipmentId' => 12,
'type' => 'box',
'height' => 12,
'length' => 2.99,
'weight' => 1.2,
'width' => 12
],
'labels' => [
'labelId' => 1,
'orderId' => 8411,
'orderExternalId' => 'ORD00101'
],
'shipFrom' => [
'email' => 'shipping@wesellem.com',
'name' => 'Stephen Alexander',
'address1' => '11 Prsilla St',
'address2' => 'Apt 10',
'address3' => null,
'city' => 'Schenectady',
'state' => 'NY',
'postalCode' => '12345',
'country' => 'United States',
'phone' => '1234567890'
]
]));
$request->setRequestUrl('{{baseUrl}}/api/v3/receivings');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v3/receivings' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"externalId": "ClientID123456",
"orderNo": "foobar1",
"expectedDate": "2014-05-27T07:00:00.000Z",
"options": {
"warehouseExternalId": "Warehouse Id for this order on client platform",
"warehouseId": 7,
"warehouseRegion": "UK",
"doNotSendEmail": 1
},
"arrangement": {
"contact": "Andrew Carr",
"phone": "7822878787",
"type": "none"
},
"shipments": {
"shipmentId": 12,
"type": "box",
"height": 12,
"length": 2.99,
"weight": 1.2,
"width": 12
},
"labels": {
"labelId": 1,
"orderId": 8411,
"orderExternalId": "ORD00101"
},
"shipFrom": {
"email": "shipping@wesellem.com",
"name": "Stephen Alexander",
"address1": "11 Prsilla St",
"address2": "Apt 10",
"address3": null,
"city": "Schenectady",
"state": "NY",
"postalCode": "12345",
"country": "United States",
"phone": "1234567890"
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v3/receivings' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"externalId": "ClientID123456",
"orderNo": "foobar1",
"expectedDate": "2014-05-27T07:00:00.000Z",
"options": {
"warehouseExternalId": "Warehouse Id for this order on client platform",
"warehouseId": 7,
"warehouseRegion": "UK",
"doNotSendEmail": 1
},
"arrangement": {
"contact": "Andrew Carr",
"phone": "7822878787",
"type": "none"
},
"shipments": {
"shipmentId": 12,
"type": "box",
"height": 12,
"length": 2.99,
"weight": 1.2,
"width": 12
},
"labels": {
"labelId": 1,
"orderId": 8411,
"orderExternalId": "ORD00101"
},
"shipFrom": {
"email": "shipping@wesellem.com",
"name": "Stephen Alexander",
"address1": "11 Prsilla St",
"address2": "Apt 10",
"address3": null,
"city": "Schenectady",
"state": "NY",
"postalCode": "12345",
"country": "United States",
"phone": "1234567890"
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"externalId\": \"ClientID123456\",\n \"orderNo\": \"foobar1\",\n \"expectedDate\": \"2014-05-27T07:00:00.000Z\",\n \"options\": {\n \"warehouseExternalId\": \"Warehouse Id for this order on client platform\",\n \"warehouseId\": 7,\n \"warehouseRegion\": \"UK\",\n \"doNotSendEmail\": 1\n },\n \"arrangement\": {\n \"contact\": \"Andrew Carr\",\n \"phone\": \"7822878787\",\n \"type\": \"none\"\n },\n \"shipments\": {\n \"shipmentId\": 12,\n \"type\": \"box\",\n \"height\": 12,\n \"length\": 2.99,\n \"weight\": 1.2,\n \"width\": 12\n },\n \"labels\": {\n \"labelId\": 1,\n \"orderId\": 8411,\n \"orderExternalId\": \"ORD00101\"\n },\n \"shipFrom\": {\n \"email\": \"shipping@wesellem.com\",\n \"name\": \"Stephen Alexander\",\n \"address1\": \"11 Prsilla St\",\n \"address2\": \"Apt 10\",\n \"address3\": null,\n \"city\": \"Schenectady\",\n \"state\": \"NY\",\n \"postalCode\": \"12345\",\n \"country\": \"United States\",\n \"phone\": \"1234567890\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/api/v3/receivings", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v3/receivings"
payload = {
"externalId": "ClientID123456",
"orderNo": "foobar1",
"expectedDate": "2014-05-27T07:00:00.000Z",
"options": {
"warehouseExternalId": "Warehouse Id for this order on client platform",
"warehouseId": 7,
"warehouseRegion": "UK",
"doNotSendEmail": 1
},
"arrangement": {
"contact": "Andrew Carr",
"phone": "7822878787",
"type": "none"
},
"shipments": {
"shipmentId": 12,
"type": "box",
"height": 12,
"length": 2.99,
"weight": 1.2,
"width": 12
},
"labels": {
"labelId": 1,
"orderId": 8411,
"orderExternalId": "ORD00101"
},
"shipFrom": {
"email": "shipping@wesellem.com",
"name": "Stephen Alexander",
"address1": "11 Prsilla St",
"address2": "Apt 10",
"address3": None,
"city": "Schenectady",
"state": "NY",
"postalCode": "12345",
"country": "United States",
"phone": "1234567890"
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v3/receivings"
payload <- "{\n \"externalId\": \"ClientID123456\",\n \"orderNo\": \"foobar1\",\n \"expectedDate\": \"2014-05-27T07:00:00.000Z\",\n \"options\": {\n \"warehouseExternalId\": \"Warehouse Id for this order on client platform\",\n \"warehouseId\": 7,\n \"warehouseRegion\": \"UK\",\n \"doNotSendEmail\": 1\n },\n \"arrangement\": {\n \"contact\": \"Andrew Carr\",\n \"phone\": \"7822878787\",\n \"type\": \"none\"\n },\n \"shipments\": {\n \"shipmentId\": 12,\n \"type\": \"box\",\n \"height\": 12,\n \"length\": 2.99,\n \"weight\": 1.2,\n \"width\": 12\n },\n \"labels\": {\n \"labelId\": 1,\n \"orderId\": 8411,\n \"orderExternalId\": \"ORD00101\"\n },\n \"shipFrom\": {\n \"email\": \"shipping@wesellem.com\",\n \"name\": \"Stephen Alexander\",\n \"address1\": \"11 Prsilla St\",\n \"address2\": \"Apt 10\",\n \"address3\": null,\n \"city\": \"Schenectady\",\n \"state\": \"NY\",\n \"postalCode\": \"12345\",\n \"country\": \"United States\",\n \"phone\": \"1234567890\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v3/receivings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"externalId\": \"ClientID123456\",\n \"orderNo\": \"foobar1\",\n \"expectedDate\": \"2014-05-27T07:00:00.000Z\",\n \"options\": {\n \"warehouseExternalId\": \"Warehouse Id for this order on client platform\",\n \"warehouseId\": 7,\n \"warehouseRegion\": \"UK\",\n \"doNotSendEmail\": 1\n },\n \"arrangement\": {\n \"contact\": \"Andrew Carr\",\n \"phone\": \"7822878787\",\n \"type\": \"none\"\n },\n \"shipments\": {\n \"shipmentId\": 12,\n \"type\": \"box\",\n \"height\": 12,\n \"length\": 2.99,\n \"weight\": 1.2,\n \"width\": 12\n },\n \"labels\": {\n \"labelId\": 1,\n \"orderId\": 8411,\n \"orderExternalId\": \"ORD00101\"\n },\n \"shipFrom\": {\n \"email\": \"shipping@wesellem.com\",\n \"name\": \"Stephen Alexander\",\n \"address1\": \"11 Prsilla St\",\n \"address2\": \"Apt 10\",\n \"address3\": null,\n \"city\": \"Schenectady\",\n \"state\": \"NY\",\n \"postalCode\": \"12345\",\n \"country\": \"United States\",\n \"phone\": \"1234567890\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/api/v3/receivings') do |req|
req.body = "{\n \"externalId\": \"ClientID123456\",\n \"orderNo\": \"foobar1\",\n \"expectedDate\": \"2014-05-27T07:00:00.000Z\",\n \"options\": {\n \"warehouseExternalId\": \"Warehouse Id for this order on client platform\",\n \"warehouseId\": 7,\n \"warehouseRegion\": \"UK\",\n \"doNotSendEmail\": 1\n },\n \"arrangement\": {\n \"contact\": \"Andrew Carr\",\n \"phone\": \"7822878787\",\n \"type\": \"none\"\n },\n \"shipments\": {\n \"shipmentId\": 12,\n \"type\": \"box\",\n \"height\": 12,\n \"length\": 2.99,\n \"weight\": 1.2,\n \"width\": 12\n },\n \"labels\": {\n \"labelId\": 1,\n \"orderId\": 8411,\n \"orderExternalId\": \"ORD00101\"\n },\n \"shipFrom\": {\n \"email\": \"shipping@wesellem.com\",\n \"name\": \"Stephen Alexander\",\n \"address1\": \"11 Prsilla St\",\n \"address2\": \"Apt 10\",\n \"address3\": null,\n \"city\": \"Schenectady\",\n \"state\": \"NY\",\n \"postalCode\": \"12345\",\n \"country\": \"United States\",\n \"phone\": \"1234567890\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v3/receivings";
let payload = json!({
"externalId": "ClientID123456",
"orderNo": "foobar1",
"expectedDate": "2014-05-27T07:00:00.000Z",
"options": json!({
"warehouseExternalId": "Warehouse Id for this order on client platform",
"warehouseId": 7,
"warehouseRegion": "UK",
"doNotSendEmail": 1
}),
"arrangement": json!({
"contact": "Andrew Carr",
"phone": "7822878787",
"type": "none"
}),
"shipments": json!({
"shipmentId": 12,
"type": "box",
"height": 12,
"length": 2.99,
"weight": 1.2,
"width": 12
}),
"labels": json!({
"labelId": 1,
"orderId": 8411,
"orderExternalId": "ORD00101"
}),
"shipFrom": json!({
"email": "shipping@wesellem.com",
"name": "Stephen Alexander",
"address1": "11 Prsilla St",
"address2": "Apt 10",
"address3": json!(null),
"city": "Schenectady",
"state": "NY",
"postalCode": "12345",
"country": "United States",
"phone": "1234567890"
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/api/v3/receivings \
--header 'content-type: application/json' \
--data '{
"externalId": "ClientID123456",
"orderNo": "foobar1",
"expectedDate": "2014-05-27T07:00:00.000Z",
"options": {
"warehouseExternalId": "Warehouse Id for this order on client platform",
"warehouseId": 7,
"warehouseRegion": "UK",
"doNotSendEmail": 1
},
"arrangement": {
"contact": "Andrew Carr",
"phone": "7822878787",
"type": "none"
},
"shipments": {
"shipmentId": 12,
"type": "box",
"height": 12,
"length": 2.99,
"weight": 1.2,
"width": 12
},
"labels": {
"labelId": 1,
"orderId": 8411,
"orderExternalId": "ORD00101"
},
"shipFrom": {
"email": "shipping@wesellem.com",
"name": "Stephen Alexander",
"address1": "11 Prsilla St",
"address2": "Apt 10",
"address3": null,
"city": "Schenectady",
"state": "NY",
"postalCode": "12345",
"country": "United States",
"phone": "1234567890"
}
}'
echo '{
"externalId": "ClientID123456",
"orderNo": "foobar1",
"expectedDate": "2014-05-27T07:00:00.000Z",
"options": {
"warehouseExternalId": "Warehouse Id for this order on client platform",
"warehouseId": 7,
"warehouseRegion": "UK",
"doNotSendEmail": 1
},
"arrangement": {
"contact": "Andrew Carr",
"phone": "7822878787",
"type": "none"
},
"shipments": {
"shipmentId": 12,
"type": "box",
"height": 12,
"length": 2.99,
"weight": 1.2,
"width": 12
},
"labels": {
"labelId": 1,
"orderId": 8411,
"orderExternalId": "ORD00101"
},
"shipFrom": {
"email": "shipping@wesellem.com",
"name": "Stephen Alexander",
"address1": "11 Prsilla St",
"address2": "Apt 10",
"address3": null,
"city": "Schenectady",
"state": "NY",
"postalCode": "12345",
"country": "United States",
"phone": "1234567890"
}
}' | \
http POST {{baseUrl}}/api/v3/receivings \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "externalId": "ClientID123456",\n "orderNo": "foobar1",\n "expectedDate": "2014-05-27T07:00:00.000Z",\n "options": {\n "warehouseExternalId": "Warehouse Id for this order on client platform",\n "warehouseId": 7,\n "warehouseRegion": "UK",\n "doNotSendEmail": 1\n },\n "arrangement": {\n "contact": "Andrew Carr",\n "phone": "7822878787",\n "type": "none"\n },\n "shipments": {\n "shipmentId": 12,\n "type": "box",\n "height": 12,\n "length": 2.99,\n "weight": 1.2,\n "width": 12\n },\n "labels": {\n "labelId": 1,\n "orderId": 8411,\n "orderExternalId": "ORD00101"\n },\n "shipFrom": {\n "email": "shipping@wesellem.com",\n "name": "Stephen Alexander",\n "address1": "11 Prsilla St",\n "address2": "Apt 10",\n "address3": null,\n "city": "Schenectady",\n "state": "NY",\n "postalCode": "12345",\n "country": "United States",\n "phone": "1234567890"\n }\n}' \
--output-document \
- {{baseUrl}}/api/v3/receivings
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"externalId": "ClientID123456",
"orderNo": "foobar1",
"expectedDate": "2014-05-27T07:00:00.000Z",
"options": [
"warehouseExternalId": "Warehouse Id for this order on client platform",
"warehouseId": 7,
"warehouseRegion": "UK",
"doNotSendEmail": 1
],
"arrangement": [
"contact": "Andrew Carr",
"phone": "7822878787",
"type": "none"
],
"shipments": [
"shipmentId": 12,
"type": "box",
"height": 12,
"length": 2.99,
"weight": 1.2,
"width": 12
],
"labels": [
"labelId": 1,
"orderId": 8411,
"orderExternalId": "ORD00101"
],
"shipFrom": [
"email": "shipping@wesellem.com",
"name": "Stephen Alexander",
"address1": "11 Prsilla St",
"address2": "Apt 10",
"address3": ,
"city": "Schenectady",
"state": "NY",
"postalCode": "12345",
"country": "United States",
"phone": "1234567890"
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v3/receivings")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Get advance ship notice
{{baseUrl}}/api/v3/receivings/:id
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v3/receivings/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v3/receivings/:id")
require "http/client"
url = "{{baseUrl}}/api/v3/receivings/:id"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/v3/receivings/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v3/receivings/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v3/receivings/:id"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/v3/receivings/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v3/receivings/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v3/receivings/:id"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v3/receivings/:id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v3/receivings/:id")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/api/v3/receivings/:id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/v3/receivings/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v3/receivings/:id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/api/v3/receivings/:id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v3/receivings/:id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v3/receivings/:id',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/api/v3/receivings/:id'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v3/receivings/:id');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/api/v3/receivings/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v3/receivings/:id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v3/receivings/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/api/v3/receivings/:id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v3/receivings/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/v3/receivings/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v3/receivings/:id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v3/receivings/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v3/receivings/:id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v3/receivings/:id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v3/receivings/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v3/receivings/:id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v3/receivings/:id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v3/receivings/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/v3/receivings/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v3/receivings/:id";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/v3/receivings/:id
http GET {{baseUrl}}/api/v3/receivings/:id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v3/receivings/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v3/receivings/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"status": 200,
"message": "Successful",
"resourceLocation": "https://api.shipwire.com/api/v3/receivings/8411?expand=all"
}
GET
Get holds detail
{{baseUrl}}/api/v3/receivings/:id/holds
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v3/receivings/:id/holds");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v3/receivings/:id/holds")
require "http/client"
url = "{{baseUrl}}/api/v3/receivings/:id/holds"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/v3/receivings/:id/holds"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v3/receivings/:id/holds");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v3/receivings/:id/holds"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/v3/receivings/:id/holds HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v3/receivings/:id/holds")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v3/receivings/:id/holds"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v3/receivings/:id/holds")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v3/receivings/:id/holds")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/api/v3/receivings/:id/holds');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/v3/receivings/:id/holds'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v3/receivings/:id/holds';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/api/v3/receivings/:id/holds',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v3/receivings/:id/holds")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v3/receivings/:id/holds',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/api/v3/receivings/:id/holds'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v3/receivings/:id/holds');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/api/v3/receivings/:id/holds'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v3/receivings/:id/holds';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v3/receivings/:id/holds"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/api/v3/receivings/:id/holds" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v3/receivings/:id/holds",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/v3/receivings/:id/holds');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v3/receivings/:id/holds');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v3/receivings/:id/holds');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v3/receivings/:id/holds' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v3/receivings/:id/holds' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v3/receivings/:id/holds")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v3/receivings/:id/holds"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v3/receivings/:id/holds"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v3/receivings/:id/holds")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/v3/receivings/:id/holds') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v3/receivings/:id/holds";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/v3/receivings/:id/holds
http GET {{baseUrl}}/api/v3/receivings/:id/holds
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v3/receivings/:id/holds
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v3/receivings/:id/holds")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"status": 200,
"message": "Successful",
"resourceLocation": "https://api.shipwire.com/api/v3/receivings/8411/holds?expand=all"
}
GET
Get instructions and the recipients contact details
{{baseUrl}}/api/v3/receivings/:id/instructionsRecipients
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v3/receivings/:id/instructionsRecipients");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v3/receivings/:id/instructionsRecipients")
require "http/client"
url = "{{baseUrl}}/api/v3/receivings/:id/instructionsRecipients"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/v3/receivings/:id/instructionsRecipients"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v3/receivings/:id/instructionsRecipients");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v3/receivings/:id/instructionsRecipients"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/v3/receivings/:id/instructionsRecipients HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v3/receivings/:id/instructionsRecipients")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v3/receivings/:id/instructionsRecipients"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v3/receivings/:id/instructionsRecipients")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v3/receivings/:id/instructionsRecipients")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/api/v3/receivings/:id/instructionsRecipients');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/v3/receivings/:id/instructionsRecipients'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v3/receivings/:id/instructionsRecipients';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/api/v3/receivings/:id/instructionsRecipients',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v3/receivings/:id/instructionsRecipients")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v3/receivings/:id/instructionsRecipients',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/api/v3/receivings/:id/instructionsRecipients'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v3/receivings/:id/instructionsRecipients');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/api/v3/receivings/:id/instructionsRecipients'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v3/receivings/:id/instructionsRecipients';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v3/receivings/:id/instructionsRecipients"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/api/v3/receivings/:id/instructionsRecipients" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v3/receivings/:id/instructionsRecipients",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/v3/receivings/:id/instructionsRecipients');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v3/receivings/:id/instructionsRecipients');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v3/receivings/:id/instructionsRecipients');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v3/receivings/:id/instructionsRecipients' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v3/receivings/:id/instructionsRecipients' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v3/receivings/:id/instructionsRecipients")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v3/receivings/:id/instructionsRecipients"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v3/receivings/:id/instructionsRecipients"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v3/receivings/:id/instructionsRecipients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/v3/receivings/:id/instructionsRecipients') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v3/receivings/:id/instructionsRecipients";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/v3/receivings/:id/instructionsRecipients
http GET {{baseUrl}}/api/v3/receivings/:id/instructionsRecipients
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v3/receivings/:id/instructionsRecipients
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v3/receivings/:id/instructionsRecipients")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"status": 200,
"message": "Successful",
"resourceLocation": "https://api.shipwire.com/api/v3/receivings/8411/instructionsRecipients?offset=0&limit=20",
"resource": {
"offset": 0,
"total": 1,
"previous": null,
"next": null
}
}
GET
Get items detail
{{baseUrl}}/api/v3/receivings/:id/items
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v3/receivings/:id/items");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v3/receivings/:id/items")
require "http/client"
url = "{{baseUrl}}/api/v3/receivings/:id/items"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/v3/receivings/:id/items"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v3/receivings/:id/items");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v3/receivings/:id/items"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/v3/receivings/:id/items HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v3/receivings/:id/items")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v3/receivings/:id/items"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v3/receivings/:id/items")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v3/receivings/:id/items")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/api/v3/receivings/:id/items');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/v3/receivings/:id/items'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v3/receivings/:id/items';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/api/v3/receivings/:id/items',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v3/receivings/:id/items")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v3/receivings/:id/items',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/api/v3/receivings/:id/items'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v3/receivings/:id/items');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/api/v3/receivings/:id/items'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v3/receivings/:id/items';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v3/receivings/:id/items"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/api/v3/receivings/:id/items" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v3/receivings/:id/items",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/v3/receivings/:id/items');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v3/receivings/:id/items');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v3/receivings/:id/items');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v3/receivings/:id/items' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v3/receivings/:id/items' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v3/receivings/:id/items")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v3/receivings/:id/items"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v3/receivings/:id/items"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v3/receivings/:id/items")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/v3/receivings/:id/items') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v3/receivings/:id/items";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/v3/receivings/:id/items
http GET {{baseUrl}}/api/v3/receivings/:id/items
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v3/receivings/:id/items
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v3/receivings/:id/items")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"status": 200,
"message": "Successful",
"resourceLocation": "https://api.shipwire.com/api/v3/receivings/8411/items?expand=all&offset=0&limit=20",
"resource": {
"offset": 0,
"total": 1,
"previous": null,
"next": null
}
}
GET
Get labels detail
{{baseUrl}}/api/v3/receivings/:id/labels
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v3/receivings/:id/labels");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v3/receivings/:id/labels")
require "http/client"
url = "{{baseUrl}}/api/v3/receivings/:id/labels"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/v3/receivings/:id/labels"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v3/receivings/:id/labels");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v3/receivings/:id/labels"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/v3/receivings/:id/labels HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v3/receivings/:id/labels")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v3/receivings/:id/labels"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v3/receivings/:id/labels")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v3/receivings/:id/labels")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/api/v3/receivings/:id/labels');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/v3/receivings/:id/labels'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v3/receivings/:id/labels';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/api/v3/receivings/:id/labels',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v3/receivings/:id/labels")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v3/receivings/:id/labels',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/api/v3/receivings/:id/labels'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v3/receivings/:id/labels');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/api/v3/receivings/:id/labels'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v3/receivings/:id/labels';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v3/receivings/:id/labels"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/api/v3/receivings/:id/labels" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v3/receivings/:id/labels",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/v3/receivings/:id/labels');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v3/receivings/:id/labels');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v3/receivings/:id/labels');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v3/receivings/:id/labels' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v3/receivings/:id/labels' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v3/receivings/:id/labels")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v3/receivings/:id/labels"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v3/receivings/:id/labels"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v3/receivings/:id/labels")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/v3/receivings/:id/labels') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v3/receivings/:id/labels";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/v3/receivings/:id/labels
http GET {{baseUrl}}/api/v3/receivings/:id/labels
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v3/receivings/:id/labels
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v3/receivings/:id/labels")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"status": 200,
"message": "Successful",
"resourceLocation": "https://api.shipwire.com/api/v3/receivings/8411/labels?expand=all",
"resource": {
"offset": 0,
"total": 1,
"previous": null,
"next": null
}
}
RESPONSE HEADERS
Content-Type
application/pdf
RESPONSE BODY text
{
"status": 200,
"message": "Successful",
"resourceLocation": "https://api.shipwire.com/api/v3/receivings/8411/labels?expand=all",
"resource": {
"offset": 0,
"total": 1,
"previous": null,
"next": null
}
}
GET
Get list of advance ship notices
{{baseUrl}}/api/v3/receivings
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v3/receivings");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v3/receivings")
require "http/client"
url = "{{baseUrl}}/api/v3/receivings"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/v3/receivings"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v3/receivings");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v3/receivings"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/v3/receivings HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v3/receivings")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v3/receivings"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v3/receivings")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v3/receivings")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/api/v3/receivings');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/v3/receivings'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v3/receivings';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/api/v3/receivings',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v3/receivings")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v3/receivings',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/api/v3/receivings'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v3/receivings');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/api/v3/receivings'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v3/receivings';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v3/receivings"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/api/v3/receivings" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v3/receivings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/v3/receivings');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v3/receivings');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v3/receivings');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v3/receivings' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v3/receivings' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v3/receivings")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v3/receivings"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v3/receivings"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v3/receivings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/v3/receivings') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v3/receivings";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/v3/receivings
http GET {{baseUrl}}/api/v3/receivings
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v3/receivings
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v3/receivings")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Get receiving extended attributes
{{baseUrl}}/api/v3/receivings/:id/extendedAttributes
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v3/receivings/:id/extendedAttributes");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v3/receivings/:id/extendedAttributes")
require "http/client"
url = "{{baseUrl}}/api/v3/receivings/:id/extendedAttributes"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/v3/receivings/:id/extendedAttributes"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v3/receivings/:id/extendedAttributes");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v3/receivings/:id/extendedAttributes"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/v3/receivings/:id/extendedAttributes HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v3/receivings/:id/extendedAttributes")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v3/receivings/:id/extendedAttributes"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v3/receivings/:id/extendedAttributes")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v3/receivings/:id/extendedAttributes")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/api/v3/receivings/:id/extendedAttributes');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/v3/receivings/:id/extendedAttributes'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v3/receivings/:id/extendedAttributes';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/api/v3/receivings/:id/extendedAttributes',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v3/receivings/:id/extendedAttributes")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v3/receivings/:id/extendedAttributes',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/api/v3/receivings/:id/extendedAttributes'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v3/receivings/:id/extendedAttributes');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/api/v3/receivings/:id/extendedAttributes'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v3/receivings/:id/extendedAttributes';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v3/receivings/:id/extendedAttributes"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/api/v3/receivings/:id/extendedAttributes" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v3/receivings/:id/extendedAttributes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/v3/receivings/:id/extendedAttributes');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v3/receivings/:id/extendedAttributes');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v3/receivings/:id/extendedAttributes');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v3/receivings/:id/extendedAttributes' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v3/receivings/:id/extendedAttributes' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v3/receivings/:id/extendedAttributes")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v3/receivings/:id/extendedAttributes"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v3/receivings/:id/extendedAttributes"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v3/receivings/:id/extendedAttributes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/v3/receivings/:id/extendedAttributes') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v3/receivings/:id/extendedAttributes";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/v3/receivings/:id/extendedAttributes
http GET {{baseUrl}}/api/v3/receivings/:id/extendedAttributes
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v3/receivings/:id/extendedAttributes
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v3/receivings/:id/extendedAttributes")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"status": 200,
"message": "Successful",
"resourceLocation": "https://api.shipwire.com/api/v3/receivings/8411/instructionsRecipients?offset=0&limit=20",
"resource": {
"offset": 0,
"total": 1,
"previous": null,
"next": null
}
}
GET
Get shipment details
{{baseUrl}}/api/v3/receivings/:id/shipments
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v3/receivings/:id/shipments");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v3/receivings/:id/shipments")
require "http/client"
url = "{{baseUrl}}/api/v3/receivings/:id/shipments"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/v3/receivings/:id/shipments"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v3/receivings/:id/shipments");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v3/receivings/:id/shipments"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/v3/receivings/:id/shipments HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v3/receivings/:id/shipments")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v3/receivings/:id/shipments"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v3/receivings/:id/shipments")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v3/receivings/:id/shipments")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/api/v3/receivings/:id/shipments');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/v3/receivings/:id/shipments'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v3/receivings/:id/shipments';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/api/v3/receivings/:id/shipments',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v3/receivings/:id/shipments")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v3/receivings/:id/shipments',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/api/v3/receivings/:id/shipments'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v3/receivings/:id/shipments');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/api/v3/receivings/:id/shipments'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v3/receivings/:id/shipments';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v3/receivings/:id/shipments"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/api/v3/receivings/:id/shipments" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v3/receivings/:id/shipments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/v3/receivings/:id/shipments');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v3/receivings/:id/shipments');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v3/receivings/:id/shipments');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v3/receivings/:id/shipments' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v3/receivings/:id/shipments' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v3/receivings/:id/shipments")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v3/receivings/:id/shipments"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v3/receivings/:id/shipments"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v3/receivings/:id/shipments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/v3/receivings/:id/shipments') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v3/receivings/:id/shipments";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/v3/receivings/:id/shipments
http GET {{baseUrl}}/api/v3/receivings/:id/shipments
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v3/receivings/:id/shipments
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v3/receivings/:id/shipments")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"status": 200,
"message": "Successful",
"resourceLocation": "https://api.shipwire.com/api/v3/receivings/8411/shipments?expand=all",
"resource": {
"offset": 0,
"total": 1,
"previous": null,
"next": null
}
}
GET
Get trackings detail
{{baseUrl}}/api/v3/receivings/:id/trackings
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v3/receivings/:id/trackings");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v3/receivings/:id/trackings")
require "http/client"
url = "{{baseUrl}}/api/v3/receivings/:id/trackings"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/api/v3/receivings/:id/trackings"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v3/receivings/:id/trackings");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v3/receivings/:id/trackings"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/api/v3/receivings/:id/trackings HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v3/receivings/:id/trackings")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v3/receivings/:id/trackings"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v3/receivings/:id/trackings")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v3/receivings/:id/trackings")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/api/v3/receivings/:id/trackings');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/v3/receivings/:id/trackings'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v3/receivings/:id/trackings';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/api/v3/receivings/:id/trackings',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v3/receivings/:id/trackings")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v3/receivings/:id/trackings',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/api/v3/receivings/:id/trackings'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v3/receivings/:id/trackings');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/api/v3/receivings/:id/trackings'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v3/receivings/:id/trackings';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v3/receivings/:id/trackings"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/api/v3/receivings/:id/trackings" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v3/receivings/:id/trackings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/api/v3/receivings/:id/trackings');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v3/receivings/:id/trackings');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v3/receivings/:id/trackings');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v3/receivings/:id/trackings' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v3/receivings/:id/trackings' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v3/receivings/:id/trackings")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v3/receivings/:id/trackings"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v3/receivings/:id/trackings"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v3/receivings/:id/trackings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/api/v3/receivings/:id/trackings') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v3/receivings/:id/trackings";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/api/v3/receivings/:id/trackings
http GET {{baseUrl}}/api/v3/receivings/:id/trackings
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v3/receivings/:id/trackings
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v3/receivings/:id/trackings")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"status": 200,
"message": "Successful",
"resourceLocation": "https://api.shipwire.com/api/v3/receivings/8411/trackings?expand=all",
"resource": {
"offset": 0,
"total": 1,
"previous": null,
"next": null
}
}
POST
Mark the receiving completed
{{baseUrl}}/api/v3.1/receivings/:id/markComplete
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v3.1/receivings/:id/markComplete");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/v3.1/receivings/:id/markComplete")
require "http/client"
url = "{{baseUrl}}/api/v3.1/receivings/:id/markComplete"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/api/v3.1/receivings/:id/markComplete"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v3.1/receivings/:id/markComplete");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v3.1/receivings/:id/markComplete"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/api/v3.1/receivings/:id/markComplete HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/v3.1/receivings/:id/markComplete")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v3.1/receivings/:id/markComplete"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v3.1/receivings/:id/markComplete")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/v3.1/receivings/:id/markComplete")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/api/v3.1/receivings/:id/markComplete');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v3.1/receivings/:id/markComplete'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v3.1/receivings/:id/markComplete';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/api/v3.1/receivings/:id/markComplete',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v3.1/receivings/:id/markComplete")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v3.1/receivings/:id/markComplete',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v3.1/receivings/:id/markComplete'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/api/v3.1/receivings/:id/markComplete');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v3.1/receivings/:id/markComplete'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v3.1/receivings/:id/markComplete';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v3.1/receivings/:id/markComplete"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/api/v3.1/receivings/:id/markComplete" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v3.1/receivings/:id/markComplete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/api/v3.1/receivings/:id/markComplete');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v3.1/receivings/:id/markComplete');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v3.1/receivings/:id/markComplete');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v3.1/receivings/:id/markComplete' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v3.1/receivings/:id/markComplete' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/api/v3.1/receivings/:id/markComplete")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v3.1/receivings/:id/markComplete"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v3.1/receivings/:id/markComplete"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v3.1/receivings/:id/markComplete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/api/v3.1/receivings/:id/markComplete') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v3.1/receivings/:id/markComplete";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/api/v3.1/receivings/:id/markComplete
http POST {{baseUrl}}/api/v3.1/receivings/:id/markComplete
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/api/v3.1/receivings/:id/markComplete
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v3.1/receivings/:id/markComplete")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"status": 200,
"message": "Successful",
"resourceLocation": null
}
PUT
Update an advance ship notice
{{baseUrl}}/api/v3/receivings/:id
QUERY PARAMS
id
BODY json
{
"externalId": "",
"orderNo": "",
"expectedDate": "",
"options": {
"warehouseExternalId": "",
"warehouseId": 0,
"warehouseRegion": "",
"doNotSendEmail": 0
},
"arrangement": {
"contact": "",
"phone": "",
"type": ""
},
"shipments": {
"shipmentId": 0,
"type": "",
"height": "",
"length": "",
"weight": "",
"width": ""
},
"labels": {
"labelId": 0,
"orderId": 0,
"orderExternalId": ""
},
"trackings": [
{
"id": 0,
"orderId": 0,
"orderExternalId": "",
"tracking": "",
"carrier": "",
"contact": "",
"phone": "",
"url": "",
"summary": "",
"summaryDate": "",
"trackedDate": "",
"delivered1Date": "",
"firstScanDate": "",
"labelCreationDate": ""
}
],
"items": [
{
"sku": "",
"quantity": 0,
"id": 0,
"productId": 0,
"productExternalId": "",
"orderId": 0,
"orderExternalId": "",
"expected": 0,
"pending": 0,
"good": 0,
"inReview": 0,
"damaged": 0
}
],
"shipFrom": {
"email": "",
"name": "",
"address1": "",
"address2": "",
"address3": "",
"city": "",
"state": "",
"postalCode": "",
"country": "",
"phone": ""
},
"instructionsRecipients": [
{
"email": "",
"name": "",
"note": ""
}
],
"extendedAttributes": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v3/receivings/:id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"externalId\": \"\",\n \"orderNo\": \"\",\n \"expectedDate\": \"\",\n \"options\": {\n \"warehouseExternalId\": \"\",\n \"warehouseId\": 0,\n \"warehouseRegion\": \"\",\n \"doNotSendEmail\": 0\n },\n \"arrangement\": {\n \"contact\": \"\",\n \"phone\": \"\",\n \"type\": \"\"\n },\n \"shipments\": {\n \"shipmentId\": 0,\n \"type\": \"\",\n \"height\": \"\",\n \"length\": \"\",\n \"weight\": \"\",\n \"width\": \"\"\n },\n \"labels\": {\n \"labelId\": 0,\n \"orderId\": 0,\n \"orderExternalId\": \"\"\n },\n \"trackings\": [\n {\n \"id\": 0,\n \"orderId\": 0,\n \"orderExternalId\": \"\",\n \"tracking\": \"\",\n \"carrier\": \"\",\n \"contact\": \"\",\n \"phone\": \"\",\n \"url\": \"\",\n \"summary\": \"\",\n \"summaryDate\": \"\",\n \"trackedDate\": \"\",\n \"delivered1Date\": \"\",\n \"firstScanDate\": \"\",\n \"labelCreationDate\": \"\"\n }\n ],\n \"items\": [\n {\n \"sku\": \"\",\n \"quantity\": 0,\n \"id\": 0,\n \"productId\": 0,\n \"productExternalId\": \"\",\n \"orderId\": 0,\n \"orderExternalId\": \"\",\n \"expected\": 0,\n \"pending\": 0,\n \"good\": 0,\n \"inReview\": 0,\n \"damaged\": 0\n }\n ],\n \"shipFrom\": {\n \"email\": \"\",\n \"name\": \"\",\n \"address1\": \"\",\n \"address2\": \"\",\n \"address3\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"postalCode\": \"\",\n \"country\": \"\",\n \"phone\": \"\"\n },\n \"instructionsRecipients\": [\n {\n \"email\": \"\",\n \"name\": \"\",\n \"note\": \"\"\n }\n ],\n \"extendedAttributes\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/api/v3/receivings/:id" {:content-type :json
:form-params {:externalId ""
:orderNo ""
:expectedDate ""
:options {:warehouseExternalId ""
:warehouseId 0
:warehouseRegion ""
:doNotSendEmail 0}
:arrangement {:contact ""
:phone ""
:type ""}
:shipments {:shipmentId 0
:type ""
:height ""
:length ""
:weight ""
:width ""}
:labels {:labelId 0
:orderId 0
:orderExternalId ""}
:trackings [{:id 0
:orderId 0
:orderExternalId ""
:tracking ""
:carrier ""
:contact ""
:phone ""
:url ""
:summary ""
:summaryDate ""
:trackedDate ""
:delivered1Date ""
:firstScanDate ""
:labelCreationDate ""}]
:items [{:sku ""
:quantity 0
:id 0
:productId 0
:productExternalId ""
:orderId 0
:orderExternalId ""
:expected 0
:pending 0
:good 0
:inReview 0
:damaged 0}]
:shipFrom {:email ""
:name ""
:address1 ""
:address2 ""
:address3 ""
:city ""
:state ""
:postalCode ""
:country ""
:phone ""}
:instructionsRecipients [{:email ""
:name ""
:note ""}]
:extendedAttributes ""}})
require "http/client"
url = "{{baseUrl}}/api/v3/receivings/:id"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"externalId\": \"\",\n \"orderNo\": \"\",\n \"expectedDate\": \"\",\n \"options\": {\n \"warehouseExternalId\": \"\",\n \"warehouseId\": 0,\n \"warehouseRegion\": \"\",\n \"doNotSendEmail\": 0\n },\n \"arrangement\": {\n \"contact\": \"\",\n \"phone\": \"\",\n \"type\": \"\"\n },\n \"shipments\": {\n \"shipmentId\": 0,\n \"type\": \"\",\n \"height\": \"\",\n \"length\": \"\",\n \"weight\": \"\",\n \"width\": \"\"\n },\n \"labels\": {\n \"labelId\": 0,\n \"orderId\": 0,\n \"orderExternalId\": \"\"\n },\n \"trackings\": [\n {\n \"id\": 0,\n \"orderId\": 0,\n \"orderExternalId\": \"\",\n \"tracking\": \"\",\n \"carrier\": \"\",\n \"contact\": \"\",\n \"phone\": \"\",\n \"url\": \"\",\n \"summary\": \"\",\n \"summaryDate\": \"\",\n \"trackedDate\": \"\",\n \"delivered1Date\": \"\",\n \"firstScanDate\": \"\",\n \"labelCreationDate\": \"\"\n }\n ],\n \"items\": [\n {\n \"sku\": \"\",\n \"quantity\": 0,\n \"id\": 0,\n \"productId\": 0,\n \"productExternalId\": \"\",\n \"orderId\": 0,\n \"orderExternalId\": \"\",\n \"expected\": 0,\n \"pending\": 0,\n \"good\": 0,\n \"inReview\": 0,\n \"damaged\": 0\n }\n ],\n \"shipFrom\": {\n \"email\": \"\",\n \"name\": \"\",\n \"address1\": \"\",\n \"address2\": \"\",\n \"address3\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"postalCode\": \"\",\n \"country\": \"\",\n \"phone\": \"\"\n },\n \"instructionsRecipients\": [\n {\n \"email\": \"\",\n \"name\": \"\",\n \"note\": \"\"\n }\n ],\n \"extendedAttributes\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/api/v3/receivings/:id"),
Content = new StringContent("{\n \"externalId\": \"\",\n \"orderNo\": \"\",\n \"expectedDate\": \"\",\n \"options\": {\n \"warehouseExternalId\": \"\",\n \"warehouseId\": 0,\n \"warehouseRegion\": \"\",\n \"doNotSendEmail\": 0\n },\n \"arrangement\": {\n \"contact\": \"\",\n \"phone\": \"\",\n \"type\": \"\"\n },\n \"shipments\": {\n \"shipmentId\": 0,\n \"type\": \"\",\n \"height\": \"\",\n \"length\": \"\",\n \"weight\": \"\",\n \"width\": \"\"\n },\n \"labels\": {\n \"labelId\": 0,\n \"orderId\": 0,\n \"orderExternalId\": \"\"\n },\n \"trackings\": [\n {\n \"id\": 0,\n \"orderId\": 0,\n \"orderExternalId\": \"\",\n \"tracking\": \"\",\n \"carrier\": \"\",\n \"contact\": \"\",\n \"phone\": \"\",\n \"url\": \"\",\n \"summary\": \"\",\n \"summaryDate\": \"\",\n \"trackedDate\": \"\",\n \"delivered1Date\": \"\",\n \"firstScanDate\": \"\",\n \"labelCreationDate\": \"\"\n }\n ],\n \"items\": [\n {\n \"sku\": \"\",\n \"quantity\": 0,\n \"id\": 0,\n \"productId\": 0,\n \"productExternalId\": \"\",\n \"orderId\": 0,\n \"orderExternalId\": \"\",\n \"expected\": 0,\n \"pending\": 0,\n \"good\": 0,\n \"inReview\": 0,\n \"damaged\": 0\n }\n ],\n \"shipFrom\": {\n \"email\": \"\",\n \"name\": \"\",\n \"address1\": \"\",\n \"address2\": \"\",\n \"address3\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"postalCode\": \"\",\n \"country\": \"\",\n \"phone\": \"\"\n },\n \"instructionsRecipients\": [\n {\n \"email\": \"\",\n \"name\": \"\",\n \"note\": \"\"\n }\n ],\n \"extendedAttributes\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v3/receivings/:id");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"externalId\": \"\",\n \"orderNo\": \"\",\n \"expectedDate\": \"\",\n \"options\": {\n \"warehouseExternalId\": \"\",\n \"warehouseId\": 0,\n \"warehouseRegion\": \"\",\n \"doNotSendEmail\": 0\n },\n \"arrangement\": {\n \"contact\": \"\",\n \"phone\": \"\",\n \"type\": \"\"\n },\n \"shipments\": {\n \"shipmentId\": 0,\n \"type\": \"\",\n \"height\": \"\",\n \"length\": \"\",\n \"weight\": \"\",\n \"width\": \"\"\n },\n \"labels\": {\n \"labelId\": 0,\n \"orderId\": 0,\n \"orderExternalId\": \"\"\n },\n \"trackings\": [\n {\n \"id\": 0,\n \"orderId\": 0,\n \"orderExternalId\": \"\",\n \"tracking\": \"\",\n \"carrier\": \"\",\n \"contact\": \"\",\n \"phone\": \"\",\n \"url\": \"\",\n \"summary\": \"\",\n \"summaryDate\": \"\",\n \"trackedDate\": \"\",\n \"delivered1Date\": \"\",\n \"firstScanDate\": \"\",\n \"labelCreationDate\": \"\"\n }\n ],\n \"items\": [\n {\n \"sku\": \"\",\n \"quantity\": 0,\n \"id\": 0,\n \"productId\": 0,\n \"productExternalId\": \"\",\n \"orderId\": 0,\n \"orderExternalId\": \"\",\n \"expected\": 0,\n \"pending\": 0,\n \"good\": 0,\n \"inReview\": 0,\n \"damaged\": 0\n }\n ],\n \"shipFrom\": {\n \"email\": \"\",\n \"name\": \"\",\n \"address1\": \"\",\n \"address2\": \"\",\n \"address3\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"postalCode\": \"\",\n \"country\": \"\",\n \"phone\": \"\"\n },\n \"instructionsRecipients\": [\n {\n \"email\": \"\",\n \"name\": \"\",\n \"note\": \"\"\n }\n ],\n \"extendedAttributes\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v3/receivings/:id"
payload := strings.NewReader("{\n \"externalId\": \"\",\n \"orderNo\": \"\",\n \"expectedDate\": \"\",\n \"options\": {\n \"warehouseExternalId\": \"\",\n \"warehouseId\": 0,\n \"warehouseRegion\": \"\",\n \"doNotSendEmail\": 0\n },\n \"arrangement\": {\n \"contact\": \"\",\n \"phone\": \"\",\n \"type\": \"\"\n },\n \"shipments\": {\n \"shipmentId\": 0,\n \"type\": \"\",\n \"height\": \"\",\n \"length\": \"\",\n \"weight\": \"\",\n \"width\": \"\"\n },\n \"labels\": {\n \"labelId\": 0,\n \"orderId\": 0,\n \"orderExternalId\": \"\"\n },\n \"trackings\": [\n {\n \"id\": 0,\n \"orderId\": 0,\n \"orderExternalId\": \"\",\n \"tracking\": \"\",\n \"carrier\": \"\",\n \"contact\": \"\",\n \"phone\": \"\",\n \"url\": \"\",\n \"summary\": \"\",\n \"summaryDate\": \"\",\n \"trackedDate\": \"\",\n \"delivered1Date\": \"\",\n \"firstScanDate\": \"\",\n \"labelCreationDate\": \"\"\n }\n ],\n \"items\": [\n {\n \"sku\": \"\",\n \"quantity\": 0,\n \"id\": 0,\n \"productId\": 0,\n \"productExternalId\": \"\",\n \"orderId\": 0,\n \"orderExternalId\": \"\",\n \"expected\": 0,\n \"pending\": 0,\n \"good\": 0,\n \"inReview\": 0,\n \"damaged\": 0\n }\n ],\n \"shipFrom\": {\n \"email\": \"\",\n \"name\": \"\",\n \"address1\": \"\",\n \"address2\": \"\",\n \"address3\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"postalCode\": \"\",\n \"country\": \"\",\n \"phone\": \"\"\n },\n \"instructionsRecipients\": [\n {\n \"email\": \"\",\n \"name\": \"\",\n \"note\": \"\"\n }\n ],\n \"extendedAttributes\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/api/v3/receivings/:id HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1440
{
"externalId": "",
"orderNo": "",
"expectedDate": "",
"options": {
"warehouseExternalId": "",
"warehouseId": 0,
"warehouseRegion": "",
"doNotSendEmail": 0
},
"arrangement": {
"contact": "",
"phone": "",
"type": ""
},
"shipments": {
"shipmentId": 0,
"type": "",
"height": "",
"length": "",
"weight": "",
"width": ""
},
"labels": {
"labelId": 0,
"orderId": 0,
"orderExternalId": ""
},
"trackings": [
{
"id": 0,
"orderId": 0,
"orderExternalId": "",
"tracking": "",
"carrier": "",
"contact": "",
"phone": "",
"url": "",
"summary": "",
"summaryDate": "",
"trackedDate": "",
"delivered1Date": "",
"firstScanDate": "",
"labelCreationDate": ""
}
],
"items": [
{
"sku": "",
"quantity": 0,
"id": 0,
"productId": 0,
"productExternalId": "",
"orderId": 0,
"orderExternalId": "",
"expected": 0,
"pending": 0,
"good": 0,
"inReview": 0,
"damaged": 0
}
],
"shipFrom": {
"email": "",
"name": "",
"address1": "",
"address2": "",
"address3": "",
"city": "",
"state": "",
"postalCode": "",
"country": "",
"phone": ""
},
"instructionsRecipients": [
{
"email": "",
"name": "",
"note": ""
}
],
"extendedAttributes": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/api/v3/receivings/:id")
.setHeader("content-type", "application/json")
.setBody("{\n \"externalId\": \"\",\n \"orderNo\": \"\",\n \"expectedDate\": \"\",\n \"options\": {\n \"warehouseExternalId\": \"\",\n \"warehouseId\": 0,\n \"warehouseRegion\": \"\",\n \"doNotSendEmail\": 0\n },\n \"arrangement\": {\n \"contact\": \"\",\n \"phone\": \"\",\n \"type\": \"\"\n },\n \"shipments\": {\n \"shipmentId\": 0,\n \"type\": \"\",\n \"height\": \"\",\n \"length\": \"\",\n \"weight\": \"\",\n \"width\": \"\"\n },\n \"labels\": {\n \"labelId\": 0,\n \"orderId\": 0,\n \"orderExternalId\": \"\"\n },\n \"trackings\": [\n {\n \"id\": 0,\n \"orderId\": 0,\n \"orderExternalId\": \"\",\n \"tracking\": \"\",\n \"carrier\": \"\",\n \"contact\": \"\",\n \"phone\": \"\",\n \"url\": \"\",\n \"summary\": \"\",\n \"summaryDate\": \"\",\n \"trackedDate\": \"\",\n \"delivered1Date\": \"\",\n \"firstScanDate\": \"\",\n \"labelCreationDate\": \"\"\n }\n ],\n \"items\": [\n {\n \"sku\": \"\",\n \"quantity\": 0,\n \"id\": 0,\n \"productId\": 0,\n \"productExternalId\": \"\",\n \"orderId\": 0,\n \"orderExternalId\": \"\",\n \"expected\": 0,\n \"pending\": 0,\n \"good\": 0,\n \"inReview\": 0,\n \"damaged\": 0\n }\n ],\n \"shipFrom\": {\n \"email\": \"\",\n \"name\": \"\",\n \"address1\": \"\",\n \"address2\": \"\",\n \"address3\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"postalCode\": \"\",\n \"country\": \"\",\n \"phone\": \"\"\n },\n \"instructionsRecipients\": [\n {\n \"email\": \"\",\n \"name\": \"\",\n \"note\": \"\"\n }\n ],\n \"extendedAttributes\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v3/receivings/:id"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"externalId\": \"\",\n \"orderNo\": \"\",\n \"expectedDate\": \"\",\n \"options\": {\n \"warehouseExternalId\": \"\",\n \"warehouseId\": 0,\n \"warehouseRegion\": \"\",\n \"doNotSendEmail\": 0\n },\n \"arrangement\": {\n \"contact\": \"\",\n \"phone\": \"\",\n \"type\": \"\"\n },\n \"shipments\": {\n \"shipmentId\": 0,\n \"type\": \"\",\n \"height\": \"\",\n \"length\": \"\",\n \"weight\": \"\",\n \"width\": \"\"\n },\n \"labels\": {\n \"labelId\": 0,\n \"orderId\": 0,\n \"orderExternalId\": \"\"\n },\n \"trackings\": [\n {\n \"id\": 0,\n \"orderId\": 0,\n \"orderExternalId\": \"\",\n \"tracking\": \"\",\n \"carrier\": \"\",\n \"contact\": \"\",\n \"phone\": \"\",\n \"url\": \"\",\n \"summary\": \"\",\n \"summaryDate\": \"\",\n \"trackedDate\": \"\",\n \"delivered1Date\": \"\",\n \"firstScanDate\": \"\",\n \"labelCreationDate\": \"\"\n }\n ],\n \"items\": [\n {\n \"sku\": \"\",\n \"quantity\": 0,\n \"id\": 0,\n \"productId\": 0,\n \"productExternalId\": \"\",\n \"orderId\": 0,\n \"orderExternalId\": \"\",\n \"expected\": 0,\n \"pending\": 0,\n \"good\": 0,\n \"inReview\": 0,\n \"damaged\": 0\n }\n ],\n \"shipFrom\": {\n \"email\": \"\",\n \"name\": \"\",\n \"address1\": \"\",\n \"address2\": \"\",\n \"address3\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"postalCode\": \"\",\n \"country\": \"\",\n \"phone\": \"\"\n },\n \"instructionsRecipients\": [\n {\n \"email\": \"\",\n \"name\": \"\",\n \"note\": \"\"\n }\n ],\n \"extendedAttributes\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"externalId\": \"\",\n \"orderNo\": \"\",\n \"expectedDate\": \"\",\n \"options\": {\n \"warehouseExternalId\": \"\",\n \"warehouseId\": 0,\n \"warehouseRegion\": \"\",\n \"doNotSendEmail\": 0\n },\n \"arrangement\": {\n \"contact\": \"\",\n \"phone\": \"\",\n \"type\": \"\"\n },\n \"shipments\": {\n \"shipmentId\": 0,\n \"type\": \"\",\n \"height\": \"\",\n \"length\": \"\",\n \"weight\": \"\",\n \"width\": \"\"\n },\n \"labels\": {\n \"labelId\": 0,\n \"orderId\": 0,\n \"orderExternalId\": \"\"\n },\n \"trackings\": [\n {\n \"id\": 0,\n \"orderId\": 0,\n \"orderExternalId\": \"\",\n \"tracking\": \"\",\n \"carrier\": \"\",\n \"contact\": \"\",\n \"phone\": \"\",\n \"url\": \"\",\n \"summary\": \"\",\n \"summaryDate\": \"\",\n \"trackedDate\": \"\",\n \"delivered1Date\": \"\",\n \"firstScanDate\": \"\",\n \"labelCreationDate\": \"\"\n }\n ],\n \"items\": [\n {\n \"sku\": \"\",\n \"quantity\": 0,\n \"id\": 0,\n \"productId\": 0,\n \"productExternalId\": \"\",\n \"orderId\": 0,\n \"orderExternalId\": \"\",\n \"expected\": 0,\n \"pending\": 0,\n \"good\": 0,\n \"inReview\": 0,\n \"damaged\": 0\n }\n ],\n \"shipFrom\": {\n \"email\": \"\",\n \"name\": \"\",\n \"address1\": \"\",\n \"address2\": \"\",\n \"address3\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"postalCode\": \"\",\n \"country\": \"\",\n \"phone\": \"\"\n },\n \"instructionsRecipients\": [\n {\n \"email\": \"\",\n \"name\": \"\",\n \"note\": \"\"\n }\n ],\n \"extendedAttributes\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v3/receivings/:id")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/api/v3/receivings/:id")
.header("content-type", "application/json")
.body("{\n \"externalId\": \"\",\n \"orderNo\": \"\",\n \"expectedDate\": \"\",\n \"options\": {\n \"warehouseExternalId\": \"\",\n \"warehouseId\": 0,\n \"warehouseRegion\": \"\",\n \"doNotSendEmail\": 0\n },\n \"arrangement\": {\n \"contact\": \"\",\n \"phone\": \"\",\n \"type\": \"\"\n },\n \"shipments\": {\n \"shipmentId\": 0,\n \"type\": \"\",\n \"height\": \"\",\n \"length\": \"\",\n \"weight\": \"\",\n \"width\": \"\"\n },\n \"labels\": {\n \"labelId\": 0,\n \"orderId\": 0,\n \"orderExternalId\": \"\"\n },\n \"trackings\": [\n {\n \"id\": 0,\n \"orderId\": 0,\n \"orderExternalId\": \"\",\n \"tracking\": \"\",\n \"carrier\": \"\",\n \"contact\": \"\",\n \"phone\": \"\",\n \"url\": \"\",\n \"summary\": \"\",\n \"summaryDate\": \"\",\n \"trackedDate\": \"\",\n \"delivered1Date\": \"\",\n \"firstScanDate\": \"\",\n \"labelCreationDate\": \"\"\n }\n ],\n \"items\": [\n {\n \"sku\": \"\",\n \"quantity\": 0,\n \"id\": 0,\n \"productId\": 0,\n \"productExternalId\": \"\",\n \"orderId\": 0,\n \"orderExternalId\": \"\",\n \"expected\": 0,\n \"pending\": 0,\n \"good\": 0,\n \"inReview\": 0,\n \"damaged\": 0\n }\n ],\n \"shipFrom\": {\n \"email\": \"\",\n \"name\": \"\",\n \"address1\": \"\",\n \"address2\": \"\",\n \"address3\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"postalCode\": \"\",\n \"country\": \"\",\n \"phone\": \"\"\n },\n \"instructionsRecipients\": [\n {\n \"email\": \"\",\n \"name\": \"\",\n \"note\": \"\"\n }\n ],\n \"extendedAttributes\": \"\"\n}")
.asString();
const data = JSON.stringify({
externalId: '',
orderNo: '',
expectedDate: '',
options: {
warehouseExternalId: '',
warehouseId: 0,
warehouseRegion: '',
doNotSendEmail: 0
},
arrangement: {
contact: '',
phone: '',
type: ''
},
shipments: {
shipmentId: 0,
type: '',
height: '',
length: '',
weight: '',
width: ''
},
labels: {
labelId: 0,
orderId: 0,
orderExternalId: ''
},
trackings: [
{
id: 0,
orderId: 0,
orderExternalId: '',
tracking: '',
carrier: '',
contact: '',
phone: '',
url: '',
summary: '',
summaryDate: '',
trackedDate: '',
delivered1Date: '',
firstScanDate: '',
labelCreationDate: ''
}
],
items: [
{
sku: '',
quantity: 0,
id: 0,
productId: 0,
productExternalId: '',
orderId: 0,
orderExternalId: '',
expected: 0,
pending: 0,
good: 0,
inReview: 0,
damaged: 0
}
],
shipFrom: {
email: '',
name: '',
address1: '',
address2: '',
address3: '',
city: '',
state: '',
postalCode: '',
country: '',
phone: ''
},
instructionsRecipients: [
{
email: '',
name: '',
note: ''
}
],
extendedAttributes: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/api/v3/receivings/:id');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/v3/receivings/:id',
headers: {'content-type': 'application/json'},
data: {
externalId: '',
orderNo: '',
expectedDate: '',
options: {
warehouseExternalId: '',
warehouseId: 0,
warehouseRegion: '',
doNotSendEmail: 0
},
arrangement: {contact: '', phone: '', type: ''},
shipments: {shipmentId: 0, type: '', height: '', length: '', weight: '', width: ''},
labels: {labelId: 0, orderId: 0, orderExternalId: ''},
trackings: [
{
id: 0,
orderId: 0,
orderExternalId: '',
tracking: '',
carrier: '',
contact: '',
phone: '',
url: '',
summary: '',
summaryDate: '',
trackedDate: '',
delivered1Date: '',
firstScanDate: '',
labelCreationDate: ''
}
],
items: [
{
sku: '',
quantity: 0,
id: 0,
productId: 0,
productExternalId: '',
orderId: 0,
orderExternalId: '',
expected: 0,
pending: 0,
good: 0,
inReview: 0,
damaged: 0
}
],
shipFrom: {
email: '',
name: '',
address1: '',
address2: '',
address3: '',
city: '',
state: '',
postalCode: '',
country: '',
phone: ''
},
instructionsRecipients: [{email: '', name: '', note: ''}],
extendedAttributes: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v3/receivings/:id';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"externalId":"","orderNo":"","expectedDate":"","options":{"warehouseExternalId":"","warehouseId":0,"warehouseRegion":"","doNotSendEmail":0},"arrangement":{"contact":"","phone":"","type":""},"shipments":{"shipmentId":0,"type":"","height":"","length":"","weight":"","width":""},"labels":{"labelId":0,"orderId":0,"orderExternalId":""},"trackings":[{"id":0,"orderId":0,"orderExternalId":"","tracking":"","carrier":"","contact":"","phone":"","url":"","summary":"","summaryDate":"","trackedDate":"","delivered1Date":"","firstScanDate":"","labelCreationDate":""}],"items":[{"sku":"","quantity":0,"id":0,"productId":0,"productExternalId":"","orderId":0,"orderExternalId":"","expected":0,"pending":0,"good":0,"inReview":0,"damaged":0}],"shipFrom":{"email":"","name":"","address1":"","address2":"","address3":"","city":"","state":"","postalCode":"","country":"","phone":""},"instructionsRecipients":[{"email":"","name":"","note":""}],"extendedAttributes":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/api/v3/receivings/:id',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "externalId": "",\n "orderNo": "",\n "expectedDate": "",\n "options": {\n "warehouseExternalId": "",\n "warehouseId": 0,\n "warehouseRegion": "",\n "doNotSendEmail": 0\n },\n "arrangement": {\n "contact": "",\n "phone": "",\n "type": ""\n },\n "shipments": {\n "shipmentId": 0,\n "type": "",\n "height": "",\n "length": "",\n "weight": "",\n "width": ""\n },\n "labels": {\n "labelId": 0,\n "orderId": 0,\n "orderExternalId": ""\n },\n "trackings": [\n {\n "id": 0,\n "orderId": 0,\n "orderExternalId": "",\n "tracking": "",\n "carrier": "",\n "contact": "",\n "phone": "",\n "url": "",\n "summary": "",\n "summaryDate": "",\n "trackedDate": "",\n "delivered1Date": "",\n "firstScanDate": "",\n "labelCreationDate": ""\n }\n ],\n "items": [\n {\n "sku": "",\n "quantity": 0,\n "id": 0,\n "productId": 0,\n "productExternalId": "",\n "orderId": 0,\n "orderExternalId": "",\n "expected": 0,\n "pending": 0,\n "good": 0,\n "inReview": 0,\n "damaged": 0\n }\n ],\n "shipFrom": {\n "email": "",\n "name": "",\n "address1": "",\n "address2": "",\n "address3": "",\n "city": "",\n "state": "",\n "postalCode": "",\n "country": "",\n "phone": ""\n },\n "instructionsRecipients": [\n {\n "email": "",\n "name": "",\n "note": ""\n }\n ],\n "extendedAttributes": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"externalId\": \"\",\n \"orderNo\": \"\",\n \"expectedDate\": \"\",\n \"options\": {\n \"warehouseExternalId\": \"\",\n \"warehouseId\": 0,\n \"warehouseRegion\": \"\",\n \"doNotSendEmail\": 0\n },\n \"arrangement\": {\n \"contact\": \"\",\n \"phone\": \"\",\n \"type\": \"\"\n },\n \"shipments\": {\n \"shipmentId\": 0,\n \"type\": \"\",\n \"height\": \"\",\n \"length\": \"\",\n \"weight\": \"\",\n \"width\": \"\"\n },\n \"labels\": {\n \"labelId\": 0,\n \"orderId\": 0,\n \"orderExternalId\": \"\"\n },\n \"trackings\": [\n {\n \"id\": 0,\n \"orderId\": 0,\n \"orderExternalId\": \"\",\n \"tracking\": \"\",\n \"carrier\": \"\",\n \"contact\": \"\",\n \"phone\": \"\",\n \"url\": \"\",\n \"summary\": \"\",\n \"summaryDate\": \"\",\n \"trackedDate\": \"\",\n \"delivered1Date\": \"\",\n \"firstScanDate\": \"\",\n \"labelCreationDate\": \"\"\n }\n ],\n \"items\": [\n {\n \"sku\": \"\",\n \"quantity\": 0,\n \"id\": 0,\n \"productId\": 0,\n \"productExternalId\": \"\",\n \"orderId\": 0,\n \"orderExternalId\": \"\",\n \"expected\": 0,\n \"pending\": 0,\n \"good\": 0,\n \"inReview\": 0,\n \"damaged\": 0\n }\n ],\n \"shipFrom\": {\n \"email\": \"\",\n \"name\": \"\",\n \"address1\": \"\",\n \"address2\": \"\",\n \"address3\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"postalCode\": \"\",\n \"country\": \"\",\n \"phone\": \"\"\n },\n \"instructionsRecipients\": [\n {\n \"email\": \"\",\n \"name\": \"\",\n \"note\": \"\"\n }\n ],\n \"extendedAttributes\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/v3/receivings/:id")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v3/receivings/:id',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
externalId: '',
orderNo: '',
expectedDate: '',
options: {
warehouseExternalId: '',
warehouseId: 0,
warehouseRegion: '',
doNotSendEmail: 0
},
arrangement: {contact: '', phone: '', type: ''},
shipments: {shipmentId: 0, type: '', height: '', length: '', weight: '', width: ''},
labels: {labelId: 0, orderId: 0, orderExternalId: ''},
trackings: [
{
id: 0,
orderId: 0,
orderExternalId: '',
tracking: '',
carrier: '',
contact: '',
phone: '',
url: '',
summary: '',
summaryDate: '',
trackedDate: '',
delivered1Date: '',
firstScanDate: '',
labelCreationDate: ''
}
],
items: [
{
sku: '',
quantity: 0,
id: 0,
productId: 0,
productExternalId: '',
orderId: 0,
orderExternalId: '',
expected: 0,
pending: 0,
good: 0,
inReview: 0,
damaged: 0
}
],
shipFrom: {
email: '',
name: '',
address1: '',
address2: '',
address3: '',
city: '',
state: '',
postalCode: '',
country: '',
phone: ''
},
instructionsRecipients: [{email: '', name: '', note: ''}],
extendedAttributes: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/v3/receivings/:id',
headers: {'content-type': 'application/json'},
body: {
externalId: '',
orderNo: '',
expectedDate: '',
options: {
warehouseExternalId: '',
warehouseId: 0,
warehouseRegion: '',
doNotSendEmail: 0
},
arrangement: {contact: '', phone: '', type: ''},
shipments: {shipmentId: 0, type: '', height: '', length: '', weight: '', width: ''},
labels: {labelId: 0, orderId: 0, orderExternalId: ''},
trackings: [
{
id: 0,
orderId: 0,
orderExternalId: '',
tracking: '',
carrier: '',
contact: '',
phone: '',
url: '',
summary: '',
summaryDate: '',
trackedDate: '',
delivered1Date: '',
firstScanDate: '',
labelCreationDate: ''
}
],
items: [
{
sku: '',
quantity: 0,
id: 0,
productId: 0,
productExternalId: '',
orderId: 0,
orderExternalId: '',
expected: 0,
pending: 0,
good: 0,
inReview: 0,
damaged: 0
}
],
shipFrom: {
email: '',
name: '',
address1: '',
address2: '',
address3: '',
city: '',
state: '',
postalCode: '',
country: '',
phone: ''
},
instructionsRecipients: [{email: '', name: '', note: ''}],
extendedAttributes: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/api/v3/receivings/:id');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
externalId: '',
orderNo: '',
expectedDate: '',
options: {
warehouseExternalId: '',
warehouseId: 0,
warehouseRegion: '',
doNotSendEmail: 0
},
arrangement: {
contact: '',
phone: '',
type: ''
},
shipments: {
shipmentId: 0,
type: '',
height: '',
length: '',
weight: '',
width: ''
},
labels: {
labelId: 0,
orderId: 0,
orderExternalId: ''
},
trackings: [
{
id: 0,
orderId: 0,
orderExternalId: '',
tracking: '',
carrier: '',
contact: '',
phone: '',
url: '',
summary: '',
summaryDate: '',
trackedDate: '',
delivered1Date: '',
firstScanDate: '',
labelCreationDate: ''
}
],
items: [
{
sku: '',
quantity: 0,
id: 0,
productId: 0,
productExternalId: '',
orderId: 0,
orderExternalId: '',
expected: 0,
pending: 0,
good: 0,
inReview: 0,
damaged: 0
}
],
shipFrom: {
email: '',
name: '',
address1: '',
address2: '',
address3: '',
city: '',
state: '',
postalCode: '',
country: '',
phone: ''
},
instructionsRecipients: [
{
email: '',
name: '',
note: ''
}
],
extendedAttributes: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/v3/receivings/:id',
headers: {'content-type': 'application/json'},
data: {
externalId: '',
orderNo: '',
expectedDate: '',
options: {
warehouseExternalId: '',
warehouseId: 0,
warehouseRegion: '',
doNotSendEmail: 0
},
arrangement: {contact: '', phone: '', type: ''},
shipments: {shipmentId: 0, type: '', height: '', length: '', weight: '', width: ''},
labels: {labelId: 0, orderId: 0, orderExternalId: ''},
trackings: [
{
id: 0,
orderId: 0,
orderExternalId: '',
tracking: '',
carrier: '',
contact: '',
phone: '',
url: '',
summary: '',
summaryDate: '',
trackedDate: '',
delivered1Date: '',
firstScanDate: '',
labelCreationDate: ''
}
],
items: [
{
sku: '',
quantity: 0,
id: 0,
productId: 0,
productExternalId: '',
orderId: 0,
orderExternalId: '',
expected: 0,
pending: 0,
good: 0,
inReview: 0,
damaged: 0
}
],
shipFrom: {
email: '',
name: '',
address1: '',
address2: '',
address3: '',
city: '',
state: '',
postalCode: '',
country: '',
phone: ''
},
instructionsRecipients: [{email: '', name: '', note: ''}],
extendedAttributes: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v3/receivings/:id';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"externalId":"","orderNo":"","expectedDate":"","options":{"warehouseExternalId":"","warehouseId":0,"warehouseRegion":"","doNotSendEmail":0},"arrangement":{"contact":"","phone":"","type":""},"shipments":{"shipmentId":0,"type":"","height":"","length":"","weight":"","width":""},"labels":{"labelId":0,"orderId":0,"orderExternalId":""},"trackings":[{"id":0,"orderId":0,"orderExternalId":"","tracking":"","carrier":"","contact":"","phone":"","url":"","summary":"","summaryDate":"","trackedDate":"","delivered1Date":"","firstScanDate":"","labelCreationDate":""}],"items":[{"sku":"","quantity":0,"id":0,"productId":0,"productExternalId":"","orderId":0,"orderExternalId":"","expected":0,"pending":0,"good":0,"inReview":0,"damaged":0}],"shipFrom":{"email":"","name":"","address1":"","address2":"","address3":"","city":"","state":"","postalCode":"","country":"","phone":""},"instructionsRecipients":[{"email":"","name":"","note":""}],"extendedAttributes":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"externalId": @"",
@"orderNo": @"",
@"expectedDate": @"",
@"options": @{ @"warehouseExternalId": @"", @"warehouseId": @0, @"warehouseRegion": @"", @"doNotSendEmail": @0 },
@"arrangement": @{ @"contact": @"", @"phone": @"", @"type": @"" },
@"shipments": @{ @"shipmentId": @0, @"type": @"", @"height": @"", @"length": @"", @"weight": @"", @"width": @"" },
@"labels": @{ @"labelId": @0, @"orderId": @0, @"orderExternalId": @"" },
@"trackings": @[ @{ @"id": @0, @"orderId": @0, @"orderExternalId": @"", @"tracking": @"", @"carrier": @"", @"contact": @"", @"phone": @"", @"url": @"", @"summary": @"", @"summaryDate": @"", @"trackedDate": @"", @"delivered1Date": @"", @"firstScanDate": @"", @"labelCreationDate": @"" } ],
@"items": @[ @{ @"sku": @"", @"quantity": @0, @"id": @0, @"productId": @0, @"productExternalId": @"", @"orderId": @0, @"orderExternalId": @"", @"expected": @0, @"pending": @0, @"good": @0, @"inReview": @0, @"damaged": @0 } ],
@"shipFrom": @{ @"email": @"", @"name": @"", @"address1": @"", @"address2": @"", @"address3": @"", @"city": @"", @"state": @"", @"postalCode": @"", @"country": @"", @"phone": @"" },
@"instructionsRecipients": @[ @{ @"email": @"", @"name": @"", @"note": @"" } ],
@"extendedAttributes": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v3/receivings/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/api/v3/receivings/:id" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"externalId\": \"\",\n \"orderNo\": \"\",\n \"expectedDate\": \"\",\n \"options\": {\n \"warehouseExternalId\": \"\",\n \"warehouseId\": 0,\n \"warehouseRegion\": \"\",\n \"doNotSendEmail\": 0\n },\n \"arrangement\": {\n \"contact\": \"\",\n \"phone\": \"\",\n \"type\": \"\"\n },\n \"shipments\": {\n \"shipmentId\": 0,\n \"type\": \"\",\n \"height\": \"\",\n \"length\": \"\",\n \"weight\": \"\",\n \"width\": \"\"\n },\n \"labels\": {\n \"labelId\": 0,\n \"orderId\": 0,\n \"orderExternalId\": \"\"\n },\n \"trackings\": [\n {\n \"id\": 0,\n \"orderId\": 0,\n \"orderExternalId\": \"\",\n \"tracking\": \"\",\n \"carrier\": \"\",\n \"contact\": \"\",\n \"phone\": \"\",\n \"url\": \"\",\n \"summary\": \"\",\n \"summaryDate\": \"\",\n \"trackedDate\": \"\",\n \"delivered1Date\": \"\",\n \"firstScanDate\": \"\",\n \"labelCreationDate\": \"\"\n }\n ],\n \"items\": [\n {\n \"sku\": \"\",\n \"quantity\": 0,\n \"id\": 0,\n \"productId\": 0,\n \"productExternalId\": \"\",\n \"orderId\": 0,\n \"orderExternalId\": \"\",\n \"expected\": 0,\n \"pending\": 0,\n \"good\": 0,\n \"inReview\": 0,\n \"damaged\": 0\n }\n ],\n \"shipFrom\": {\n \"email\": \"\",\n \"name\": \"\",\n \"address1\": \"\",\n \"address2\": \"\",\n \"address3\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"postalCode\": \"\",\n \"country\": \"\",\n \"phone\": \"\"\n },\n \"instructionsRecipients\": [\n {\n \"email\": \"\",\n \"name\": \"\",\n \"note\": \"\"\n }\n ],\n \"extendedAttributes\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v3/receivings/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'externalId' => '',
'orderNo' => '',
'expectedDate' => '',
'options' => [
'warehouseExternalId' => '',
'warehouseId' => 0,
'warehouseRegion' => '',
'doNotSendEmail' => 0
],
'arrangement' => [
'contact' => '',
'phone' => '',
'type' => ''
],
'shipments' => [
'shipmentId' => 0,
'type' => '',
'height' => '',
'length' => '',
'weight' => '',
'width' => ''
],
'labels' => [
'labelId' => 0,
'orderId' => 0,
'orderExternalId' => ''
],
'trackings' => [
[
'id' => 0,
'orderId' => 0,
'orderExternalId' => '',
'tracking' => '',
'carrier' => '',
'contact' => '',
'phone' => '',
'url' => '',
'summary' => '',
'summaryDate' => '',
'trackedDate' => '',
'delivered1Date' => '',
'firstScanDate' => '',
'labelCreationDate' => ''
]
],
'items' => [
[
'sku' => '',
'quantity' => 0,
'id' => 0,
'productId' => 0,
'productExternalId' => '',
'orderId' => 0,
'orderExternalId' => '',
'expected' => 0,
'pending' => 0,
'good' => 0,
'inReview' => 0,
'damaged' => 0
]
],
'shipFrom' => [
'email' => '',
'name' => '',
'address1' => '',
'address2' => '',
'address3' => '',
'city' => '',
'state' => '',
'postalCode' => '',
'country' => '',
'phone' => ''
],
'instructionsRecipients' => [
[
'email' => '',
'name' => '',
'note' => ''
]
],
'extendedAttributes' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/api/v3/receivings/:id', [
'body' => '{
"externalId": "",
"orderNo": "",
"expectedDate": "",
"options": {
"warehouseExternalId": "",
"warehouseId": 0,
"warehouseRegion": "",
"doNotSendEmail": 0
},
"arrangement": {
"contact": "",
"phone": "",
"type": ""
},
"shipments": {
"shipmentId": 0,
"type": "",
"height": "",
"length": "",
"weight": "",
"width": ""
},
"labels": {
"labelId": 0,
"orderId": 0,
"orderExternalId": ""
},
"trackings": [
{
"id": 0,
"orderId": 0,
"orderExternalId": "",
"tracking": "",
"carrier": "",
"contact": "",
"phone": "",
"url": "",
"summary": "",
"summaryDate": "",
"trackedDate": "",
"delivered1Date": "",
"firstScanDate": "",
"labelCreationDate": ""
}
],
"items": [
{
"sku": "",
"quantity": 0,
"id": 0,
"productId": 0,
"productExternalId": "",
"orderId": 0,
"orderExternalId": "",
"expected": 0,
"pending": 0,
"good": 0,
"inReview": 0,
"damaged": 0
}
],
"shipFrom": {
"email": "",
"name": "",
"address1": "",
"address2": "",
"address3": "",
"city": "",
"state": "",
"postalCode": "",
"country": "",
"phone": ""
},
"instructionsRecipients": [
{
"email": "",
"name": "",
"note": ""
}
],
"extendedAttributes": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/v3/receivings/:id');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'externalId' => '',
'orderNo' => '',
'expectedDate' => '',
'options' => [
'warehouseExternalId' => '',
'warehouseId' => 0,
'warehouseRegion' => '',
'doNotSendEmail' => 0
],
'arrangement' => [
'contact' => '',
'phone' => '',
'type' => ''
],
'shipments' => [
'shipmentId' => 0,
'type' => '',
'height' => '',
'length' => '',
'weight' => '',
'width' => ''
],
'labels' => [
'labelId' => 0,
'orderId' => 0,
'orderExternalId' => ''
],
'trackings' => [
[
'id' => 0,
'orderId' => 0,
'orderExternalId' => '',
'tracking' => '',
'carrier' => '',
'contact' => '',
'phone' => '',
'url' => '',
'summary' => '',
'summaryDate' => '',
'trackedDate' => '',
'delivered1Date' => '',
'firstScanDate' => '',
'labelCreationDate' => ''
]
],
'items' => [
[
'sku' => '',
'quantity' => 0,
'id' => 0,
'productId' => 0,
'productExternalId' => '',
'orderId' => 0,
'orderExternalId' => '',
'expected' => 0,
'pending' => 0,
'good' => 0,
'inReview' => 0,
'damaged' => 0
]
],
'shipFrom' => [
'email' => '',
'name' => '',
'address1' => '',
'address2' => '',
'address3' => '',
'city' => '',
'state' => '',
'postalCode' => '',
'country' => '',
'phone' => ''
],
'instructionsRecipients' => [
[
'email' => '',
'name' => '',
'note' => ''
]
],
'extendedAttributes' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'externalId' => '',
'orderNo' => '',
'expectedDate' => '',
'options' => [
'warehouseExternalId' => '',
'warehouseId' => 0,
'warehouseRegion' => '',
'doNotSendEmail' => 0
],
'arrangement' => [
'contact' => '',
'phone' => '',
'type' => ''
],
'shipments' => [
'shipmentId' => 0,
'type' => '',
'height' => '',
'length' => '',
'weight' => '',
'width' => ''
],
'labels' => [
'labelId' => 0,
'orderId' => 0,
'orderExternalId' => ''
],
'trackings' => [
[
'id' => 0,
'orderId' => 0,
'orderExternalId' => '',
'tracking' => '',
'carrier' => '',
'contact' => '',
'phone' => '',
'url' => '',
'summary' => '',
'summaryDate' => '',
'trackedDate' => '',
'delivered1Date' => '',
'firstScanDate' => '',
'labelCreationDate' => ''
]
],
'items' => [
[
'sku' => '',
'quantity' => 0,
'id' => 0,
'productId' => 0,
'productExternalId' => '',
'orderId' => 0,
'orderExternalId' => '',
'expected' => 0,
'pending' => 0,
'good' => 0,
'inReview' => 0,
'damaged' => 0
]
],
'shipFrom' => [
'email' => '',
'name' => '',
'address1' => '',
'address2' => '',
'address3' => '',
'city' => '',
'state' => '',
'postalCode' => '',
'country' => '',
'phone' => ''
],
'instructionsRecipients' => [
[
'email' => '',
'name' => '',
'note' => ''
]
],
'extendedAttributes' => ''
]));
$request->setRequestUrl('{{baseUrl}}/api/v3/receivings/:id');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v3/receivings/:id' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"externalId": "",
"orderNo": "",
"expectedDate": "",
"options": {
"warehouseExternalId": "",
"warehouseId": 0,
"warehouseRegion": "",
"doNotSendEmail": 0
},
"arrangement": {
"contact": "",
"phone": "",
"type": ""
},
"shipments": {
"shipmentId": 0,
"type": "",
"height": "",
"length": "",
"weight": "",
"width": ""
},
"labels": {
"labelId": 0,
"orderId": 0,
"orderExternalId": ""
},
"trackings": [
{
"id": 0,
"orderId": 0,
"orderExternalId": "",
"tracking": "",
"carrier": "",
"contact": "",
"phone": "",
"url": "",
"summary": "",
"summaryDate": "",
"trackedDate": "",
"delivered1Date": "",
"firstScanDate": "",
"labelCreationDate": ""
}
],
"items": [
{
"sku": "",
"quantity": 0,
"id": 0,
"productId": 0,
"productExternalId": "",
"orderId": 0,
"orderExternalId": "",
"expected": 0,
"pending": 0,
"good": 0,
"inReview": 0,
"damaged": 0
}
],
"shipFrom": {
"email": "",
"name": "",
"address1": "",
"address2": "",
"address3": "",
"city": "",
"state": "",
"postalCode": "",
"country": "",
"phone": ""
},
"instructionsRecipients": [
{
"email": "",
"name": "",
"note": ""
}
],
"extendedAttributes": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v3/receivings/:id' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"externalId": "",
"orderNo": "",
"expectedDate": "",
"options": {
"warehouseExternalId": "",
"warehouseId": 0,
"warehouseRegion": "",
"doNotSendEmail": 0
},
"arrangement": {
"contact": "",
"phone": "",
"type": ""
},
"shipments": {
"shipmentId": 0,
"type": "",
"height": "",
"length": "",
"weight": "",
"width": ""
},
"labels": {
"labelId": 0,
"orderId": 0,
"orderExternalId": ""
},
"trackings": [
{
"id": 0,
"orderId": 0,
"orderExternalId": "",
"tracking": "",
"carrier": "",
"contact": "",
"phone": "",
"url": "",
"summary": "",
"summaryDate": "",
"trackedDate": "",
"delivered1Date": "",
"firstScanDate": "",
"labelCreationDate": ""
}
],
"items": [
{
"sku": "",
"quantity": 0,
"id": 0,
"productId": 0,
"productExternalId": "",
"orderId": 0,
"orderExternalId": "",
"expected": 0,
"pending": 0,
"good": 0,
"inReview": 0,
"damaged": 0
}
],
"shipFrom": {
"email": "",
"name": "",
"address1": "",
"address2": "",
"address3": "",
"city": "",
"state": "",
"postalCode": "",
"country": "",
"phone": ""
},
"instructionsRecipients": [
{
"email": "",
"name": "",
"note": ""
}
],
"extendedAttributes": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"externalId\": \"\",\n \"orderNo\": \"\",\n \"expectedDate\": \"\",\n \"options\": {\n \"warehouseExternalId\": \"\",\n \"warehouseId\": 0,\n \"warehouseRegion\": \"\",\n \"doNotSendEmail\": 0\n },\n \"arrangement\": {\n \"contact\": \"\",\n \"phone\": \"\",\n \"type\": \"\"\n },\n \"shipments\": {\n \"shipmentId\": 0,\n \"type\": \"\",\n \"height\": \"\",\n \"length\": \"\",\n \"weight\": \"\",\n \"width\": \"\"\n },\n \"labels\": {\n \"labelId\": 0,\n \"orderId\": 0,\n \"orderExternalId\": \"\"\n },\n \"trackings\": [\n {\n \"id\": 0,\n \"orderId\": 0,\n \"orderExternalId\": \"\",\n \"tracking\": \"\",\n \"carrier\": \"\",\n \"contact\": \"\",\n \"phone\": \"\",\n \"url\": \"\",\n \"summary\": \"\",\n \"summaryDate\": \"\",\n \"trackedDate\": \"\",\n \"delivered1Date\": \"\",\n \"firstScanDate\": \"\",\n \"labelCreationDate\": \"\"\n }\n ],\n \"items\": [\n {\n \"sku\": \"\",\n \"quantity\": 0,\n \"id\": 0,\n \"productId\": 0,\n \"productExternalId\": \"\",\n \"orderId\": 0,\n \"orderExternalId\": \"\",\n \"expected\": 0,\n \"pending\": 0,\n \"good\": 0,\n \"inReview\": 0,\n \"damaged\": 0\n }\n ],\n \"shipFrom\": {\n \"email\": \"\",\n \"name\": \"\",\n \"address1\": \"\",\n \"address2\": \"\",\n \"address3\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"postalCode\": \"\",\n \"country\": \"\",\n \"phone\": \"\"\n },\n \"instructionsRecipients\": [\n {\n \"email\": \"\",\n \"name\": \"\",\n \"note\": \"\"\n }\n ],\n \"extendedAttributes\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/api/v3/receivings/:id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v3/receivings/:id"
payload = {
"externalId": "",
"orderNo": "",
"expectedDate": "",
"options": {
"warehouseExternalId": "",
"warehouseId": 0,
"warehouseRegion": "",
"doNotSendEmail": 0
},
"arrangement": {
"contact": "",
"phone": "",
"type": ""
},
"shipments": {
"shipmentId": 0,
"type": "",
"height": "",
"length": "",
"weight": "",
"width": ""
},
"labels": {
"labelId": 0,
"orderId": 0,
"orderExternalId": ""
},
"trackings": [
{
"id": 0,
"orderId": 0,
"orderExternalId": "",
"tracking": "",
"carrier": "",
"contact": "",
"phone": "",
"url": "",
"summary": "",
"summaryDate": "",
"trackedDate": "",
"delivered1Date": "",
"firstScanDate": "",
"labelCreationDate": ""
}
],
"items": [
{
"sku": "",
"quantity": 0,
"id": 0,
"productId": 0,
"productExternalId": "",
"orderId": 0,
"orderExternalId": "",
"expected": 0,
"pending": 0,
"good": 0,
"inReview": 0,
"damaged": 0
}
],
"shipFrom": {
"email": "",
"name": "",
"address1": "",
"address2": "",
"address3": "",
"city": "",
"state": "",
"postalCode": "",
"country": "",
"phone": ""
},
"instructionsRecipients": [
{
"email": "",
"name": "",
"note": ""
}
],
"extendedAttributes": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v3/receivings/:id"
payload <- "{\n \"externalId\": \"\",\n \"orderNo\": \"\",\n \"expectedDate\": \"\",\n \"options\": {\n \"warehouseExternalId\": \"\",\n \"warehouseId\": 0,\n \"warehouseRegion\": \"\",\n \"doNotSendEmail\": 0\n },\n \"arrangement\": {\n \"contact\": \"\",\n \"phone\": \"\",\n \"type\": \"\"\n },\n \"shipments\": {\n \"shipmentId\": 0,\n \"type\": \"\",\n \"height\": \"\",\n \"length\": \"\",\n \"weight\": \"\",\n \"width\": \"\"\n },\n \"labels\": {\n \"labelId\": 0,\n \"orderId\": 0,\n \"orderExternalId\": \"\"\n },\n \"trackings\": [\n {\n \"id\": 0,\n \"orderId\": 0,\n \"orderExternalId\": \"\",\n \"tracking\": \"\",\n \"carrier\": \"\",\n \"contact\": \"\",\n \"phone\": \"\",\n \"url\": \"\",\n \"summary\": \"\",\n \"summaryDate\": \"\",\n \"trackedDate\": \"\",\n \"delivered1Date\": \"\",\n \"firstScanDate\": \"\",\n \"labelCreationDate\": \"\"\n }\n ],\n \"items\": [\n {\n \"sku\": \"\",\n \"quantity\": 0,\n \"id\": 0,\n \"productId\": 0,\n \"productExternalId\": \"\",\n \"orderId\": 0,\n \"orderExternalId\": \"\",\n \"expected\": 0,\n \"pending\": 0,\n \"good\": 0,\n \"inReview\": 0,\n \"damaged\": 0\n }\n ],\n \"shipFrom\": {\n \"email\": \"\",\n \"name\": \"\",\n \"address1\": \"\",\n \"address2\": \"\",\n \"address3\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"postalCode\": \"\",\n \"country\": \"\",\n \"phone\": \"\"\n },\n \"instructionsRecipients\": [\n {\n \"email\": \"\",\n \"name\": \"\",\n \"note\": \"\"\n }\n ],\n \"extendedAttributes\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v3/receivings/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"externalId\": \"\",\n \"orderNo\": \"\",\n \"expectedDate\": \"\",\n \"options\": {\n \"warehouseExternalId\": \"\",\n \"warehouseId\": 0,\n \"warehouseRegion\": \"\",\n \"doNotSendEmail\": 0\n },\n \"arrangement\": {\n \"contact\": \"\",\n \"phone\": \"\",\n \"type\": \"\"\n },\n \"shipments\": {\n \"shipmentId\": 0,\n \"type\": \"\",\n \"height\": \"\",\n \"length\": \"\",\n \"weight\": \"\",\n \"width\": \"\"\n },\n \"labels\": {\n \"labelId\": 0,\n \"orderId\": 0,\n \"orderExternalId\": \"\"\n },\n \"trackings\": [\n {\n \"id\": 0,\n \"orderId\": 0,\n \"orderExternalId\": \"\",\n \"tracking\": \"\",\n \"carrier\": \"\",\n \"contact\": \"\",\n \"phone\": \"\",\n \"url\": \"\",\n \"summary\": \"\",\n \"summaryDate\": \"\",\n \"trackedDate\": \"\",\n \"delivered1Date\": \"\",\n \"firstScanDate\": \"\",\n \"labelCreationDate\": \"\"\n }\n ],\n \"items\": [\n {\n \"sku\": \"\",\n \"quantity\": 0,\n \"id\": 0,\n \"productId\": 0,\n \"productExternalId\": \"\",\n \"orderId\": 0,\n \"orderExternalId\": \"\",\n \"expected\": 0,\n \"pending\": 0,\n \"good\": 0,\n \"inReview\": 0,\n \"damaged\": 0\n }\n ],\n \"shipFrom\": {\n \"email\": \"\",\n \"name\": \"\",\n \"address1\": \"\",\n \"address2\": \"\",\n \"address3\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"postalCode\": \"\",\n \"country\": \"\",\n \"phone\": \"\"\n },\n \"instructionsRecipients\": [\n {\n \"email\": \"\",\n \"name\": \"\",\n \"note\": \"\"\n }\n ],\n \"extendedAttributes\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/api/v3/receivings/:id') do |req|
req.body = "{\n \"externalId\": \"\",\n \"orderNo\": \"\",\n \"expectedDate\": \"\",\n \"options\": {\n \"warehouseExternalId\": \"\",\n \"warehouseId\": 0,\n \"warehouseRegion\": \"\",\n \"doNotSendEmail\": 0\n },\n \"arrangement\": {\n \"contact\": \"\",\n \"phone\": \"\",\n \"type\": \"\"\n },\n \"shipments\": {\n \"shipmentId\": 0,\n \"type\": \"\",\n \"height\": \"\",\n \"length\": \"\",\n \"weight\": \"\",\n \"width\": \"\"\n },\n \"labels\": {\n \"labelId\": 0,\n \"orderId\": 0,\n \"orderExternalId\": \"\"\n },\n \"trackings\": [\n {\n \"id\": 0,\n \"orderId\": 0,\n \"orderExternalId\": \"\",\n \"tracking\": \"\",\n \"carrier\": \"\",\n \"contact\": \"\",\n \"phone\": \"\",\n \"url\": \"\",\n \"summary\": \"\",\n \"summaryDate\": \"\",\n \"trackedDate\": \"\",\n \"delivered1Date\": \"\",\n \"firstScanDate\": \"\",\n \"labelCreationDate\": \"\"\n }\n ],\n \"items\": [\n {\n \"sku\": \"\",\n \"quantity\": 0,\n \"id\": 0,\n \"productId\": 0,\n \"productExternalId\": \"\",\n \"orderId\": 0,\n \"orderExternalId\": \"\",\n \"expected\": 0,\n \"pending\": 0,\n \"good\": 0,\n \"inReview\": 0,\n \"damaged\": 0\n }\n ],\n \"shipFrom\": {\n \"email\": \"\",\n \"name\": \"\",\n \"address1\": \"\",\n \"address2\": \"\",\n \"address3\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"postalCode\": \"\",\n \"country\": \"\",\n \"phone\": \"\"\n },\n \"instructionsRecipients\": [\n {\n \"email\": \"\",\n \"name\": \"\",\n \"note\": \"\"\n }\n ],\n \"extendedAttributes\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v3/receivings/:id";
let payload = json!({
"externalId": "",
"orderNo": "",
"expectedDate": "",
"options": json!({
"warehouseExternalId": "",
"warehouseId": 0,
"warehouseRegion": "",
"doNotSendEmail": 0
}),
"arrangement": json!({
"contact": "",
"phone": "",
"type": ""
}),
"shipments": json!({
"shipmentId": 0,
"type": "",
"height": "",
"length": "",
"weight": "",
"width": ""
}),
"labels": json!({
"labelId": 0,
"orderId": 0,
"orderExternalId": ""
}),
"trackings": (
json!({
"id": 0,
"orderId": 0,
"orderExternalId": "",
"tracking": "",
"carrier": "",
"contact": "",
"phone": "",
"url": "",
"summary": "",
"summaryDate": "",
"trackedDate": "",
"delivered1Date": "",
"firstScanDate": "",
"labelCreationDate": ""
})
),
"items": (
json!({
"sku": "",
"quantity": 0,
"id": 0,
"productId": 0,
"productExternalId": "",
"orderId": 0,
"orderExternalId": "",
"expected": 0,
"pending": 0,
"good": 0,
"inReview": 0,
"damaged": 0
})
),
"shipFrom": json!({
"email": "",
"name": "",
"address1": "",
"address2": "",
"address3": "",
"city": "",
"state": "",
"postalCode": "",
"country": "",
"phone": ""
}),
"instructionsRecipients": (
json!({
"email": "",
"name": "",
"note": ""
})
),
"extendedAttributes": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/api/v3/receivings/:id \
--header 'content-type: application/json' \
--data '{
"externalId": "",
"orderNo": "",
"expectedDate": "",
"options": {
"warehouseExternalId": "",
"warehouseId": 0,
"warehouseRegion": "",
"doNotSendEmail": 0
},
"arrangement": {
"contact": "",
"phone": "",
"type": ""
},
"shipments": {
"shipmentId": 0,
"type": "",
"height": "",
"length": "",
"weight": "",
"width": ""
},
"labels": {
"labelId": 0,
"orderId": 0,
"orderExternalId": ""
},
"trackings": [
{
"id": 0,
"orderId": 0,
"orderExternalId": "",
"tracking": "",
"carrier": "",
"contact": "",
"phone": "",
"url": "",
"summary": "",
"summaryDate": "",
"trackedDate": "",
"delivered1Date": "",
"firstScanDate": "",
"labelCreationDate": ""
}
],
"items": [
{
"sku": "",
"quantity": 0,
"id": 0,
"productId": 0,
"productExternalId": "",
"orderId": 0,
"orderExternalId": "",
"expected": 0,
"pending": 0,
"good": 0,
"inReview": 0,
"damaged": 0
}
],
"shipFrom": {
"email": "",
"name": "",
"address1": "",
"address2": "",
"address3": "",
"city": "",
"state": "",
"postalCode": "",
"country": "",
"phone": ""
},
"instructionsRecipients": [
{
"email": "",
"name": "",
"note": ""
}
],
"extendedAttributes": ""
}'
echo '{
"externalId": "",
"orderNo": "",
"expectedDate": "",
"options": {
"warehouseExternalId": "",
"warehouseId": 0,
"warehouseRegion": "",
"doNotSendEmail": 0
},
"arrangement": {
"contact": "",
"phone": "",
"type": ""
},
"shipments": {
"shipmentId": 0,
"type": "",
"height": "",
"length": "",
"weight": "",
"width": ""
},
"labels": {
"labelId": 0,
"orderId": 0,
"orderExternalId": ""
},
"trackings": [
{
"id": 0,
"orderId": 0,
"orderExternalId": "",
"tracking": "",
"carrier": "",
"contact": "",
"phone": "",
"url": "",
"summary": "",
"summaryDate": "",
"trackedDate": "",
"delivered1Date": "",
"firstScanDate": "",
"labelCreationDate": ""
}
],
"items": [
{
"sku": "",
"quantity": 0,
"id": 0,
"productId": 0,
"productExternalId": "",
"orderId": 0,
"orderExternalId": "",
"expected": 0,
"pending": 0,
"good": 0,
"inReview": 0,
"damaged": 0
}
],
"shipFrom": {
"email": "",
"name": "",
"address1": "",
"address2": "",
"address3": "",
"city": "",
"state": "",
"postalCode": "",
"country": "",
"phone": ""
},
"instructionsRecipients": [
{
"email": "",
"name": "",
"note": ""
}
],
"extendedAttributes": ""
}' | \
http PUT {{baseUrl}}/api/v3/receivings/:id \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "externalId": "",\n "orderNo": "",\n "expectedDate": "",\n "options": {\n "warehouseExternalId": "",\n "warehouseId": 0,\n "warehouseRegion": "",\n "doNotSendEmail": 0\n },\n "arrangement": {\n "contact": "",\n "phone": "",\n "type": ""\n },\n "shipments": {\n "shipmentId": 0,\n "type": "",\n "height": "",\n "length": "",\n "weight": "",\n "width": ""\n },\n "labels": {\n "labelId": 0,\n "orderId": 0,\n "orderExternalId": ""\n },\n "trackings": [\n {\n "id": 0,\n "orderId": 0,\n "orderExternalId": "",\n "tracking": "",\n "carrier": "",\n "contact": "",\n "phone": "",\n "url": "",\n "summary": "",\n "summaryDate": "",\n "trackedDate": "",\n "delivered1Date": "",\n "firstScanDate": "",\n "labelCreationDate": ""\n }\n ],\n "items": [\n {\n "sku": "",\n "quantity": 0,\n "id": 0,\n "productId": 0,\n "productExternalId": "",\n "orderId": 0,\n "orderExternalId": "",\n "expected": 0,\n "pending": 0,\n "good": 0,\n "inReview": 0,\n "damaged": 0\n }\n ],\n "shipFrom": {\n "email": "",\n "name": "",\n "address1": "",\n "address2": "",\n "address3": "",\n "city": "",\n "state": "",\n "postalCode": "",\n "country": "",\n "phone": ""\n },\n "instructionsRecipients": [\n {\n "email": "",\n "name": "",\n "note": ""\n }\n ],\n "extendedAttributes": ""\n}' \
--output-document \
- {{baseUrl}}/api/v3/receivings/:id
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"externalId": "",
"orderNo": "",
"expectedDate": "",
"options": [
"warehouseExternalId": "",
"warehouseId": 0,
"warehouseRegion": "",
"doNotSendEmail": 0
],
"arrangement": [
"contact": "",
"phone": "",
"type": ""
],
"shipments": [
"shipmentId": 0,
"type": "",
"height": "",
"length": "",
"weight": "",
"width": ""
],
"labels": [
"labelId": 0,
"orderId": 0,
"orderExternalId": ""
],
"trackings": [
[
"id": 0,
"orderId": 0,
"orderExternalId": "",
"tracking": "",
"carrier": "",
"contact": "",
"phone": "",
"url": "",
"summary": "",
"summaryDate": "",
"trackedDate": "",
"delivered1Date": "",
"firstScanDate": "",
"labelCreationDate": ""
]
],
"items": [
[
"sku": "",
"quantity": 0,
"id": 0,
"productId": 0,
"productExternalId": "",
"orderId": 0,
"orderExternalId": "",
"expected": 0,
"pending": 0,
"good": 0,
"inReview": 0,
"damaged": 0
]
],
"shipFrom": [
"email": "",
"name": "",
"address1": "",
"address2": "",
"address3": "",
"city": "",
"state": "",
"postalCode": "",
"country": "",
"phone": ""
],
"instructionsRecipients": [
[
"email": "",
"name": "",
"note": ""
]
],
"extendedAttributes": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v3/receivings/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"status": 200,
"message": "Successful",
"resourceLocation": "https://api.shipwire.com/api/v3/receivings/8411?expand=all"
}