diff --git a/src/NSwag.CodeGeneration.CSharp.Tests/ClientGenerationTests.cs b/src/NSwag.CodeGeneration.CSharp.Tests/ClientGenerationTests.cs index 5aa46fb3f..d309bdb3c 100644 --- a/src/NSwag.CodeGeneration.CSharp.Tests/ClientGenerationTests.cs +++ b/src/NSwag.CodeGeneration.CSharp.Tests/ClientGenerationTests.cs @@ -8,10 +8,22 @@ public class ClientGenerationTests [Fact] public async Task CanGenerateFromJiraOpenApiSpecification() { - await VerifyOutput("JIRA_OpenAPI", "jira-open-api.json"); + await VerifyOutput("JIRA_OpenAPI", "jira-open-api.json", compile: false); } - private static async Task VerifyOutput(string name, string fileName) + [Fact] + public async Task CanGenerateFromShipBobOpenApiSpecification() + { + await VerifyOutput("ShipBob_OpenAPI", "shipbob-2025-07.json"); + } + + [Fact] + public async Task CanGenerateFromNhsSpineServicesOpenApiSpecification() + { + await VerifyOutput("NHS_SpineServices_OpenAPI", "nhs-spineservices.json"); + } + + private static async Task VerifyOutput(string name, string fileName, bool compile = true) { var specification = await File.ReadAllTextAsync(Path.Combine("TestData", fileName)); @@ -27,6 +39,9 @@ await VerifyHelper .Verify(code, scrubApiComments: false) .UseFileName(name); - // TODO CodeCompiler.AssertCompile(code); + if (compile) + { + CSharpCompiler.AssertCompile(code); + } } } \ No newline at end of file diff --git a/src/NSwag.CodeGeneration.CSharp.Tests/Snapshots/NHS_SpineServices_OpenAPI.verified.txt b/src/NSwag.CodeGeneration.CSharp.Tests/Snapshots/NHS_SpineServices_OpenAPI.verified.txt new file mode 100644 index 000000000..66e138aac --- /dev/null +++ b/src/NSwag.CodeGeneration.CSharp.Tests/Snapshots/NHS_SpineServices_OpenAPI.verified.txt @@ -0,0 +1,3263 @@ + + +namespace MyNamespace +{ + using System = global::System; + + public partial class Client + { + #pragma warning disable 8618 + private string _baseUrl; + #pragma warning restore 8618 + + private System.Net.Http.HttpClient _httpClient; + private static System.Lazy _settings = new System.Lazy(CreateSerializerSettings, true); + private Newtonsoft.Json.JsonSerializerSettings _instanceSettings; + + #pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable. + public Client(string baseUrl, System.Net.Http.HttpClient httpClient) + #pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable. + { + BaseUrl = baseUrl; + _httpClient = httpClient; + Initialize(); + } + + private static Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() + { + var settings = new Newtonsoft.Json.JsonSerializerSettings(); + UpdateJsonSerializerSettings(settings); + return settings; + } + + public string BaseUrl + { + get { return _baseUrl; } + set + { + _baseUrl = value; + if (!string.IsNullOrEmpty(_baseUrl) && !_baseUrl.EndsWith("/")) + _baseUrl += '/'; + } + } + + protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _instanceSettings ?? _settings.Value; } } + + static partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); + + partial void Initialize(); + + partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); + partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); + partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Returns a list of Notifications + /// + /// Returns a list of Notifications + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task NotificationsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "ORD/2-0-0/notifications" + urlBuilder_.Append("ORD/2-0-0/notifications"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Search for a list of Organisations, Multiple filters can be used at once except for RelTypeId which only works with the parameters defined in it's description. + /// + /// The current name of the organisation to search for, e.g. UK PLC + /// A Role or multiple roles separated by commas that organisations belong to, e.g. RO198,RO197 + /// Returns organisations that have been updated on or since this date in the format YYYY-MM-DD, e.g. 2021-12-01 + /// The Relationship Type Id of the organisation to search for. This filter can only be used with the TargetOrgId and LastChangeDate, e.g. RE5 + /// The Target Organisation Id of the organisation to search for. This filter cannot be used on it's own and can only be used with the RelTypeId, e.g. RRF12 + /// The Organisation Record class of the organisation to search for, e.g. RC2 + /// The Non-Primary Role Id of the organisation to search for, e.g. RO197 + /// The Primary Role Id of the organisation to search for, e.g. RO198 + /// The postcode of the organisation to search for, e.g. CW10 9FG + /// The current status of the organisation to search for, expects Active or Inactive, e.g. Active + /// Limit the number of records that are returned, default=20, min=1, max=1000, e.g. 100 + /// Used in conjunction with the Limit filter, offset the returned values by the value given, e.g. 200 + /// Sets the format of the response, if not set the response with be in json format. + /// Search for a list of Organisations + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task OrganisationsAsync(string name = null, string roles = null, string lastChangeDate = null, string relTypeId = null, string targetOrgId = null, string orgRecordClass = null, string nonPrimaryRoleId = null, string primaryRoleId = null, string postCode = null, Status? status = null, int? limit = null, int? offset = null, _format? _format = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "ORD/2-0-0/organisations" + urlBuilder_.Append("ORD/2-0-0/organisations"); + urlBuilder_.Append('?'); + if (name != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("Name")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(name, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (roles != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("Roles")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(roles, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (lastChangeDate != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("LastChangeDate")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(lastChangeDate, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (relTypeId != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("RelTypeId")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(relTypeId, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (targetOrgId != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("TargetOrgId")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(targetOrgId, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (orgRecordClass != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("OrgRecordClass")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(orgRecordClass, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (nonPrimaryRoleId != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("NonPrimaryRoleId")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(nonPrimaryRoleId, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (primaryRoleId != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("PrimaryRoleId")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(primaryRoleId, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (postCode != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("PostCode")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(postCode, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (status != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("Status")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(status, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (limit != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("Limit")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(limit, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (offset != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("Offset")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(offset, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (_format != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("_format")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(_format, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Returns a single Organisation + /// + /// ID of the Organisation + /// Sets the format of the response, if not set the response with be in json format. + /// Auto generated using Swagger Inspector + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task Organisations2Async(string ods_code, _format2? _format = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (ods_code == null) + throw new System.ArgumentNullException("ods_code"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "ORD/2-0-0/organisations/{ods_code}" + urlBuilder_.Append("ORD/2-0-0/organisations/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(ods_code, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append('?'); + if (_format != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("_format")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(_format, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Returns a list of Record classes. + /// + /// Sets the format of the response, if not set the response with be in json format. + /// Returns a list of Record classes. + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task RecordclassesAsync(_format3? _format = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "ORD/2-0-0/recordclasses" + urlBuilder_.Append("ORD/2-0-0/recordclasses"); + urlBuilder_.Append('?'); + if (_format != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("_format")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(_format, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Returns a single record class + /// + /// ID of the class + /// Sets the format of the response, if not set the response with be in json format. + /// Returns a single record class + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task Recordclasses2Async(string class_id, _format4? _format = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (class_id == null) + throw new System.ArgumentNullException("class_id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "ORD/2-0-0/recordclasses/{class_id}" + urlBuilder_.Append("ORD/2-0-0/recordclasses/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(class_id, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append('?'); + if (_format != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("_format")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(_format, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Returns a list of Relationships + /// + /// Sets the format of the response, if not set the response with be in json format. + /// Returns a list of Relationships + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task RelsAsync(_format5? _format = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "ORD/2-0-0/rels" + urlBuilder_.Append("ORD/2-0-0/rels"); + urlBuilder_.Append('?'); + if (_format != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("_format")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(_format, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Returns a single Relationship + /// + /// ID of the Relationship + /// Sets the format of the response, if not set the response with be in json format. + /// Returns a single Relationship + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task Rels2Async(string rel_id, _format6? _format = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (rel_id == null) + throw new System.ArgumentNullException("rel_id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "ORD/2-0-0/rels/{rel_id}" + urlBuilder_.Append("ORD/2-0-0/rels/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(rel_id, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append('?'); + if (_format != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("_format")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(_format, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Returns a list of Roles + /// + /// Sets the format of the response, if not set the response with be in json format. + /// Returns a list of Roles + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task RolesAsync(_format7? _format = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "ORD/2-0-0/roles" + urlBuilder_.Append("ORD/2-0-0/roles"); + urlBuilder_.Append('?'); + if (_format != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("_format")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(_format, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Returns a single Role + /// + /// ID of the Role + /// Sets the format of the response, if not set the response with be in json format. + /// Returns a single Role + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task Roles2Async(string role_id, _format8? _format = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (role_id == null) + throw new System.ArgumentNullException("role_id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "ORD/2-0-0/roles/{role_id}" + urlBuilder_.Append("ORD/2-0-0/roles/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(role_id, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append('?'); + if (_format != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("_format")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(_format, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Returns a list of Organisation endpoints + /// + /// Returns organisations that have been updated on or since this date in the format YYYY-MM-DD, e.g. 2021-12-01 + /// The format to return the response in, expects xml or json, e.g. xml + /// Returns a list of Organisation endpoints + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task SyncAsync(string lastChangeDate, _format9? _format = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (lastChangeDate == null) + throw new System.ArgumentNullException("lastChangeDate"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "ORD/2-0-0/sync" + urlBuilder_.Append("ORD/2-0-0/sync"); + urlBuilder_.Append('?'); + urlBuilder_.Append(System.Uri.EscapeDataString("LastChangeDate")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(lastChangeDate, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + if (_format != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("_format")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(_format, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Returns a list of FHIR Roles + /// + /// Sets the format of the response, if not set the response with be in json format. + /// Returns a list of FHIR Roles + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task ODSAPIOrganizationRole1Async(_format10? _format = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "STU3/CodeSystem/ODSAPI-OrganizationRole-1" + urlBuilder_.Append("STU3/CodeSystem/ODSAPI-OrganizationRole-1"); + urlBuilder_.Append('?'); + if (_format != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("_format")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(_format, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Returns a list of FHIR Organizations + /// + /// The current name of the organisation to search for, e.g. integration + /// A Role or multiple roles separated by commas that organisations belong to, e.g. RRF12 + /// A Role or multiple roles separated by commas that organisations belong to, e.g. 101,107 + /// The ods-org-primaryRole of the organisation to search for. This filter cannot be used on it's own and can only be used with the ods-org-role, e.g. true + /// The postcode of the organisation to search for, searches for postcode starting with this value. e.g. 'TS23' + /// The postcode of the organisation to search for, searches for postcode containing this value. e.g. '2LA' + /// The postcode of the organisation to search for, searches for an exact match of this value. e.g. 'TS23 2LA' + /// The city of the organisation to search for, searches for cities starting with this value. e.g. 'lee' + /// The city of the organisation to search for, searches for cities containing this value. e.g. 'eed' + /// The city of the organisation to search for, searches for an exact match of this value. e.g. 'leeds' + /// The current status of the organisation to search for, expects true or false, e.g. false + /// Returns organisations by id, e.g. RRF + /// Returns organisations that have been since this date in the format gtYYYY-MM-DD, e.g. gt2021-12-01 + /// The total count, only one value "count" + /// Limit the number of records that are returned, min=0, max=20, e.g. 10 + /// Offset the returned values by the value given, e.g. 2 + /// Sets the format of the response, if not set the response with be in json format. + /// Returns a list of FHIR Organizations + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task OrganizationAsync(string name = null, string identifier = null, string ods_org_role = null, OdsOrgPrimaryRole? ods_org_primaryRole = null, string address_postalcode = null, string address_postalcode_contains = null, string address_postalcode_exact = null, string address_city = null, string address_city_contains = null, string address_city_exact = null, Active? active = null, string _id = null, string _lastUpdated = null, string _summary = null, int? _count = null, int? _page = null, _format11? _format = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "STU3/Organization" + urlBuilder_.Append("STU3/Organization"); + urlBuilder_.Append('?'); + if (name != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("name")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(name, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (identifier != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("identifier")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(identifier, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (ods_org_role != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("ods-org-role")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(ods_org_role, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (ods_org_primaryRole != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("ods-org-primaryRole")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(ods_org_primaryRole, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (address_postalcode != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("address-postalcode")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(address_postalcode, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (address_postalcode_contains != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("address-postalcode:contains")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(address_postalcode_contains, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (address_postalcode_exact != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("address-postalcode:exact")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(address_postalcode_exact, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (address_city != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("address-city")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(address_city, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (address_city_contains != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("address-city:contains")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(address_city_contains, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (address_city_exact != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("address-city:exact")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(address_city_exact, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (active != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("active")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(active, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (_id != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("_id")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(_id, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (_lastUpdated != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("_lastUpdated")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(_lastUpdated, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (_summary != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("_summary")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(_summary, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (_count != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("_count")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(_count, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (_page != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("_page")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(_page, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (_format != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("_format")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(_format, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Returns FHIR Organization details + /// + /// ID of the Organization + /// Sets the format of the response, if not set the response with be in json format. + /// Returns FHIR Organization details + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task Organization2Async(string ods_code, _format12? _format = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (ods_code == null) + throw new System.ArgumentNullException("ods_code"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "STU3/Organization/{ods_code}" + urlBuilder_.Append("STU3/Organization/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(ods_code, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append('?'); + if (_format != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("_format")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(_format, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Returns Metadata + /// + /// Sets the format of the response, if not set the response with be in json format. + /// Returns Metadata + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task MetadataAsync(_format13? _format = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "STU3/metadata" + urlBuilder_.Append("STU3/metadata"); + urlBuilder_.Append('?'); + if (_format != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("_format")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(_format, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + protected struct ObjectResponseResult + { + public ObjectResponseResult(T responseObject, string responseText) + { + this.Object = responseObject; + this.Text = responseText; + } + + public T Object { get; } + + public string Text { get; } + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + private static System.Threading.Tasks.Task ReadAsStringAsync(System.Net.Http.HttpContent content, System.Threading.CancellationToken cancellationToken) + { + #if NET5_0_OR_GREATER + return content.ReadAsStringAsync(cancellationToken); + #else + return content.ReadAsStringAsync(); + #endif + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + private static System.Threading.Tasks.Task ReadAsStreamAsync(System.Net.Http.HttpContent content, System.Threading.CancellationToken cancellationToken) + { + #if NET5_0_OR_GREATER + return content.ReadAsStreamAsync(cancellationToken); + #else + return content.ReadAsStreamAsync(); + #endif + } + + public bool ReadResponseAsString { get; set; } + + protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) + { + if (response == null || response.Content == null) + { + return new ObjectResponseResult(default(T), string.Empty); + } + + if (ReadResponseAsString) + { + var responseText = await ReadAsStringAsync(response.Content, cancellationToken).ConfigureAwait(false); + try + { + var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); + return new ObjectResponseResult(typedBody, responseText); + } + catch (Newtonsoft.Json.JsonException exception) + { + var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; + throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); + } + } + else + { + try + { + using (var responseStream = await ReadAsStreamAsync(response.Content, cancellationToken).ConfigureAwait(false)) + using (var streamReader = new System.IO.StreamReader(responseStream)) + using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) + { + var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); + var typedBody = serializer.Deserialize(jsonTextReader); + return new ObjectResponseResult(typedBody, string.Empty); + } + } + catch (Newtonsoft.Json.JsonException exception) + { + var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; + throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); + } + } + } + + private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) + { + if (value == null) + { + return ""; + } + + if (value is System.Enum) + { + var name = System.Enum.GetName(value.GetType(), value); + if (name != null) + { + var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); + if (field != null) + { + var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) + as System.Runtime.Serialization.EnumMemberAttribute; + if (attribute != null) + { + return attribute.Value != null ? attribute.Value : name; + } + } + + var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); + return converted == null ? string.Empty : converted; + } + } + else if (value is bool) + { + return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); + } + else if (value is byte[]) + { + return System.Convert.ToBase64String((byte[]) value); + } + else if (value is string[]) + { + return string.Join(",", (string[])value); + } + else if (value.GetType().IsArray) + { + var valueArray = (System.Array)value; + var valueTextArray = new string[valueArray.Length]; + for (var i = 0; i < valueArray.Length; i++) + { + valueTextArray[i] = ConvertToString(valueArray.GetValue(i), cultureInfo); + } + return string.Join(",", valueTextArray); + } + + var result = System.Convert.ToString(value, cultureInfo); + return result == null ? "" : result; + } + } + + public enum Status + { + + [System.Runtime.Serialization.EnumMember(Value = @"Active")] + Active = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"Inactive")] + Inactive = 1, + + } + + public enum _format + { + + [System.Runtime.Serialization.EnumMember(Value = @"json")] + Json = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"xml")] + Xml = 1, + + } + + public enum _format2 + { + + [System.Runtime.Serialization.EnumMember(Value = @"json")] + Json = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"xml")] + Xml = 1, + + } + + public enum _format3 + { + + [System.Runtime.Serialization.EnumMember(Value = @"json")] + Json = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"xml")] + Xml = 1, + + } + + public enum _format4 + { + + [System.Runtime.Serialization.EnumMember(Value = @"json")] + Json = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"xml")] + Xml = 1, + + } + + public enum _format5 + { + + [System.Runtime.Serialization.EnumMember(Value = @"json")] + Json = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"xml")] + Xml = 1, + + } + + public enum _format6 + { + + [System.Runtime.Serialization.EnumMember(Value = @"json")] + Json = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"xml")] + Xml = 1, + + } + + public enum _format7 + { + + [System.Runtime.Serialization.EnumMember(Value = @"json")] + Json = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"xml")] + Xml = 1, + + } + + public enum _format8 + { + + [System.Runtime.Serialization.EnumMember(Value = @"json")] + Json = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"xml")] + Xml = 1, + + } + + public enum _format9 + { + + [System.Runtime.Serialization.EnumMember(Value = @"xml")] + Xml = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"json")] + Json = 1, + + } + + public enum _format10 + { + + [System.Runtime.Serialization.EnumMember(Value = @"json")] + Json = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"xml")] + Xml = 1, + + } + + public enum OdsOrgPrimaryRole + { + + [System.Runtime.Serialization.EnumMember(Value = @"True")] + True = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"False")] + False = 1, + + } + + public enum Active + { + + [System.Runtime.Serialization.EnumMember(Value = @"True")] + True = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"False")] + False = 1, + + } + + public enum _format11 + { + + [System.Runtime.Serialization.EnumMember(Value = @"json")] + Json = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"xml")] + Xml = 1, + + } + + public enum _format12 + { + + [System.Runtime.Serialization.EnumMember(Value = @"json")] + Json = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"xml")] + Xml = 1, + + } + + public enum _format13 + { + + [System.Runtime.Serialization.EnumMember(Value = @"json")] + Json = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"xml")] + Xml = 1, + + } + + public partial class Response + { + + [Newtonsoft.Json.JsonProperty("DeletedOrganisations", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection DeletedOrganisations { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Response2 + { + + [Newtonsoft.Json.JsonProperty("Organisations", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Organisations { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Response3 + { + + [Newtonsoft.Json.JsonProperty("Organisation", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Organisation Organisation { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Response4 + { + + [Newtonsoft.Json.JsonProperty("RecordClasses", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection RecordClasses { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Response5 + { + + [Newtonsoft.Json.JsonProperty("RecordClasses", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection RecordClasses { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Response6 + { + + [Newtonsoft.Json.JsonProperty("Relationships", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Relationships { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Response7 + { + + [Newtonsoft.Json.JsonProperty("Relationships", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Relationships { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Response8 + { + + [Newtonsoft.Json.JsonProperty("Roles", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Roles { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Response9 + { + + [Newtonsoft.Json.JsonProperty("Roles", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Roles { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Response10 + { + + [Newtonsoft.Json.JsonProperty("Organisations", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Organisations { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Response11 + { + + [Newtonsoft.Json.JsonProperty("concept", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Concept { get; set; } + + [Newtonsoft.Json.JsonProperty("contact", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Contact { get; set; } + + [Newtonsoft.Json.JsonProperty("content", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Content { get; set; } + + [Newtonsoft.Json.JsonProperty("copyright", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Copyright { get; set; } + + [Newtonsoft.Json.JsonProperty("date", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Date { get; set; } + + [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Description { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("publisher", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Publisher { get; set; } + + [Newtonsoft.Json.JsonProperty("resourceType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ResourceType { get; set; } + + [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Status { get; set; } + + [Newtonsoft.Json.JsonProperty("url", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Url { get; set; } + + [Newtonsoft.Json.JsonProperty("version", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Version { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Response12 + { + + [Newtonsoft.Json.JsonProperty("entry", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Entry { get; set; } + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + [Newtonsoft.Json.JsonProperty("link", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Link { get; set; } + + [Newtonsoft.Json.JsonProperty("meta", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Meta Meta { get; set; } + + [Newtonsoft.Json.JsonProperty("resourceType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ResourceType { get; set; } + + [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Total { get; set; } + + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Type { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Response13 + { + + [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Active { get; set; } + + [Newtonsoft.Json.JsonProperty("address", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Address Address { get; set; } + + [Newtonsoft.Json.JsonProperty("extension", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Extension { get; set; } + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + [Newtonsoft.Json.JsonProperty("identifier", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Identifier Identifier { get; set; } + + [Newtonsoft.Json.JsonProperty("meta", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Meta2 Meta { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("resourceType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ResourceType { get; set; } + + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Type Type { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Response14 + { + + [Newtonsoft.Json.JsonProperty("acceptUnknown", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string AcceptUnknown { get; set; } + + [Newtonsoft.Json.JsonProperty("contact", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Contact { get; set; } + + [Newtonsoft.Json.JsonProperty("copyright", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Copyright { get; set; } + + [Newtonsoft.Json.JsonProperty("date", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Date { get; set; } + + [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Description { get; set; } + + [Newtonsoft.Json.JsonProperty("fhirVersion", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string FhirVersion { get; set; } + + [Newtonsoft.Json.JsonProperty("format", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Format { get; set; } + + [Newtonsoft.Json.JsonProperty("implementationGuide", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection ImplementationGuide { get; set; } + + [Newtonsoft.Json.JsonProperty("instantiates", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Instantiates { get; set; } + + [Newtonsoft.Json.JsonProperty("kind", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Kind { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("profile", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Profile { get; set; } + + [Newtonsoft.Json.JsonProperty("publisher", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Publisher { get; set; } + + [Newtonsoft.Json.JsonProperty("resourceType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ResourceType { get; set; } + + [Newtonsoft.Json.JsonProperty("rest", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Rest { get; set; } + + [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Status { get; set; } + + [Newtonsoft.Json.JsonProperty("url", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Url { get; set; } + + [Newtonsoft.Json.JsonProperty("version", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Version { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class DeletedOrganisations + { + + [Newtonsoft.Json.JsonProperty("OrgID", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string OrgID { get; set; } + + [Newtonsoft.Json.JsonProperty("PrimaryRoleId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string PrimaryRoleId { get; set; } + + [Newtonsoft.Json.JsonProperty("reason", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Reason Reason { get; set; } + + [Newtonsoft.Json.JsonProperty("time", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Time { get; set; } + + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Type2 Type { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Organisations + { + + [Newtonsoft.Json.JsonProperty("LastChangeDate", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string LastChangeDate { get; set; } + + [Newtonsoft.Json.JsonProperty("Name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("OrgId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string OrgId { get; set; } + + [Newtonsoft.Json.JsonProperty("OrgLink", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string OrgLink { get; set; } + + [Newtonsoft.Json.JsonProperty("OrgRecordClass", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string OrgRecordClass { get; set; } + + [Newtonsoft.Json.JsonProperty("PostCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string PostCode { get; set; } + + [Newtonsoft.Json.JsonProperty("PrimaryRoleDescription", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string PrimaryRoleDescription { get; set; } + + [Newtonsoft.Json.JsonProperty("PrimaryRoleId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string PrimaryRoleId { get; set; } + + [Newtonsoft.Json.JsonProperty("Status", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Status { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Organisation + { + + [Newtonsoft.Json.JsonProperty("Date", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Date { get; set; } + + [Newtonsoft.Json.JsonProperty("GeoLoc", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public GeoLoc GeoLoc { get; set; } + + [Newtonsoft.Json.JsonProperty("LastChangeDate", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string LastChangeDate { get; set; } + + [Newtonsoft.Json.JsonProperty("Name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("OrgId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public OrgId OrgId { get; set; } + + [Newtonsoft.Json.JsonProperty("Roles", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Roles3 Roles { get; set; } + + [Newtonsoft.Json.JsonProperty("Status", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Status { get; set; } + + [Newtonsoft.Json.JsonProperty("orgRecordClass", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string OrgRecordClass { get; set; } + + [Newtonsoft.Json.JsonProperty("refOnly", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool RefOnly { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class RecordClasses + { + + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Code { get; set; } + + [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string DisplayName { get; set; } + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class RecordClasses2 + { + + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Code { get; set; } + + [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string DisplayName { get; set; } + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Relationships + { + + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Code { get; set; } + + [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string DisplayName { get; set; } + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Relationships2 + { + + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Code { get; set; } + + [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string DisplayName { get; set; } + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Roles + { + + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Code { get; set; } + + [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string DisplayName { get; set; } + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + [Newtonsoft.Json.JsonProperty("primaryRole", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string PrimaryRole { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Roles2 + { + + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Code { get; set; } + + [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string DisplayName { get; set; } + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + [Newtonsoft.Json.JsonProperty("primaryRole", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string PrimaryRole { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Organisations2 + { + + [Newtonsoft.Json.JsonProperty("OrgLink", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string OrgLink { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Concept + { + + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Code { get; set; } + + [Newtonsoft.Json.JsonProperty("display", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Display { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Contact + { + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("telecom", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Telecom { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Entry + { + + [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Active { get; set; } + + [Newtonsoft.Json.JsonProperty("address", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Address2 Address { get; set; } + + [Newtonsoft.Json.JsonProperty("extension", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Extension { get; set; } + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + [Newtonsoft.Json.JsonProperty("identifier", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Identifier2 Identifier { get; set; } + + [Newtonsoft.Json.JsonProperty("meta", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Meta3 Meta { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("resourceType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ResourceType { get; set; } + + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Type3 Type { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Link + { + + [Newtonsoft.Json.JsonProperty("relation", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Relation { get; set; } + + [Newtonsoft.Json.JsonProperty("url", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Url { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Meta + { + + [Newtonsoft.Json.JsonProperty("lastUpdated", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string LastUpdated { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Address + { + + [Newtonsoft.Json.JsonProperty("city", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string City { get; set; } + + [Newtonsoft.Json.JsonProperty("country", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Country { get; set; } + + [Newtonsoft.Json.JsonProperty("district", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string District { get; set; } + + [Newtonsoft.Json.JsonProperty("line", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Line { get; set; } + + [Newtonsoft.Json.JsonProperty("postalCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string PostalCode { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Extension + { + + [Newtonsoft.Json.JsonProperty("url", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Url { get; set; } + + [Newtonsoft.Json.JsonProperty("valuePeriod", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ValuePeriod ValuePeriod { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Identifier + { + + [Newtonsoft.Json.JsonProperty("system", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string System { get; set; } + + [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Value { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Meta2 + { + + [Newtonsoft.Json.JsonProperty("lastUpdated", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string LastUpdated { get; set; } + + [Newtonsoft.Json.JsonProperty("profile", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Profile { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Type + { + + [Newtonsoft.Json.JsonProperty("coding", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Coding Coding { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Contact2 + { + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("telecom", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Telecom { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Profile + { + + [Newtonsoft.Json.JsonProperty("reference", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reference { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Rest + { + + [Newtonsoft.Json.JsonProperty("mode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Mode { get; set; } + + [Newtonsoft.Json.JsonProperty("resource", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Resource { get; set; } + + [Newtonsoft.Json.JsonProperty("security", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Security Security { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Reason + { + + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Code { get; set; } + + [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Description { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Type2 + { + + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Code { get; set; } + + [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Description { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Date + { + + [Newtonsoft.Json.JsonProperty("End", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string End { get; set; } + + [Newtonsoft.Json.JsonProperty("Start", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Start { get; set; } + + [Newtonsoft.Json.JsonProperty("Type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Type { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class GeoLoc + { + + [Newtonsoft.Json.JsonProperty("Location", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Location Location { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class OrgId + { + + [Newtonsoft.Json.JsonProperty("assigningAuthorityName", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string AssigningAuthorityName { get; set; } + + [Newtonsoft.Json.JsonProperty("extension", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Extension { get; set; } + + [Newtonsoft.Json.JsonProperty("root", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Root { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Roles3 + { + + [Newtonsoft.Json.JsonProperty("Role", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Role { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Telecom + { + + [Newtonsoft.Json.JsonProperty("system", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string System { get; set; } + + [Newtonsoft.Json.JsonProperty("use", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Use { get; set; } + + [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Value { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Address2 + { + + [Newtonsoft.Json.JsonProperty("city", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string City { get; set; } + + [Newtonsoft.Json.JsonProperty("country", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Country { get; set; } + + [Newtonsoft.Json.JsonProperty("district", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string District { get; set; } + + [Newtonsoft.Json.JsonProperty("line", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Line { get; set; } + + [Newtonsoft.Json.JsonProperty("postalCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string PostalCode { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Extension2 + { + + [Newtonsoft.Json.JsonProperty("url", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Url { get; set; } + + [Newtonsoft.Json.JsonProperty("valuePeriod", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ValuePeriod2 ValuePeriod { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Identifier2 + { + + [Newtonsoft.Json.JsonProperty("system", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string System { get; set; } + + [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Value { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Meta3 + { + + [Newtonsoft.Json.JsonProperty("lastUpdated", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string LastUpdated { get; set; } + + [Newtonsoft.Json.JsonProperty("profile", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Profile { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Type3 + { + + [Newtonsoft.Json.JsonProperty("coding", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Coding2 Coding { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class ValuePeriod + { + + [Newtonsoft.Json.JsonProperty("end", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string End { get; set; } + + [Newtonsoft.Json.JsonProperty("extension", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Extension { get; set; } + + [Newtonsoft.Json.JsonProperty("start", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Start { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Coding + { + + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Code { get; set; } + + [Newtonsoft.Json.JsonProperty("display", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Display { get; set; } + + [Newtonsoft.Json.JsonProperty("system", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string System { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Telecom2 + { + + [Newtonsoft.Json.JsonProperty("system", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string System { get; set; } + + [Newtonsoft.Json.JsonProperty("use", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Use { get; set; } + + [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Value { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Resource + { + + [Newtonsoft.Json.JsonProperty("conditionalCreate", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool ConditionalCreate { get; set; } + + [Newtonsoft.Json.JsonProperty("conditionalDelete", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ConditionalDelete { get; set; } + + [Newtonsoft.Json.JsonProperty("conditionalRead", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ConditionalRead { get; set; } + + [Newtonsoft.Json.JsonProperty("conditionalUpdate", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool ConditionalUpdate { get; set; } + + [Newtonsoft.Json.JsonProperty("extension", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Extension { get; set; } + + [Newtonsoft.Json.JsonProperty("interaction", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Interaction { get; set; } + + [Newtonsoft.Json.JsonProperty("profile", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Profile2 Profile { get; set; } + + [Newtonsoft.Json.JsonProperty("readHistory", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool ReadHistory { get; set; } + + [Newtonsoft.Json.JsonProperty("searchParam", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection SearchParam { get; set; } + + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Type { get; set; } + + [Newtonsoft.Json.JsonProperty("updateCreate", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool UpdateCreate { get; set; } + + [Newtonsoft.Json.JsonProperty("versioning", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Versioning { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Security + { + + [Newtonsoft.Json.JsonProperty("cors", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Cors { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Location + { + + [Newtonsoft.Json.JsonProperty("AddrLn1", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string AddrLn1 { get; set; } + + [Newtonsoft.Json.JsonProperty("AddrLn2", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string AddrLn2 { get; set; } + + [Newtonsoft.Json.JsonProperty("Country", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Country { get; set; } + + [Newtonsoft.Json.JsonProperty("County", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string County { get; set; } + + [Newtonsoft.Json.JsonProperty("PostCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string PostCode { get; set; } + + [Newtonsoft.Json.JsonProperty("Town", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Town { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Role + { + + [Newtonsoft.Json.JsonProperty("Date", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Date { get; set; } + + [Newtonsoft.Json.JsonProperty("Status", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Status { get; set; } + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + [Newtonsoft.Json.JsonProperty("primaryRole", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool PrimaryRole { get; set; } + + [Newtonsoft.Json.JsonProperty("uniqueRoleId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int UniqueRoleId { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class ValuePeriod2 + { + + [Newtonsoft.Json.JsonProperty("end", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string End { get; set; } + + [Newtonsoft.Json.JsonProperty("extension", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Extension { get; set; } + + [Newtonsoft.Json.JsonProperty("start", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Start { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Coding2 + { + + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Code { get; set; } + + [Newtonsoft.Json.JsonProperty("display", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Display { get; set; } + + [Newtonsoft.Json.JsonProperty("system", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string System { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Extension3 + { + + [Newtonsoft.Json.JsonProperty("url", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Url { get; set; } + + [Newtonsoft.Json.JsonProperty("valueString", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ValueString { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Extension4 + { + + [Newtonsoft.Json.JsonProperty("extension", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Extension { get; set; } + + [Newtonsoft.Json.JsonProperty("url", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Url { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Interaction + { + + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Code { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Profile2 + { + + [Newtonsoft.Json.JsonProperty("reference", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reference { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class SearchParam + { + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Type { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Date2 + { + + [Newtonsoft.Json.JsonProperty("End", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string End { get; set; } + + [Newtonsoft.Json.JsonProperty("Start", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Start { get; set; } + + [Newtonsoft.Json.JsonProperty("Type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Type { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Extension5 + { + + [Newtonsoft.Json.JsonProperty("url", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Url { get; set; } + + [Newtonsoft.Json.JsonProperty("valueString", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ValueString { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Extension6 + { + + [Newtonsoft.Json.JsonProperty("url", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Url { get; set; } + + [Newtonsoft.Json.JsonProperty("valueString", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ValueString { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + + + public partial class ApiException : System.Exception + { + public int StatusCode { get; private set; } + + public string Response { get; private set; } + + public System.Collections.Generic.IReadOnlyDictionary> Headers { get; private set; } + + public ApiException(string message, int statusCode, string response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Exception innerException) + : base(message + "\n\nStatus: " + statusCode + "\nResponse: \n" + ((response == null) ? "(null)" : response.Substring(0, response.Length >= 512 ? 512 : response.Length)), innerException) + { + StatusCode = statusCode; + Response = response; + Headers = headers; + } + + public override string ToString() + { + return string.Format("HTTP Response: \n\n{0}\n\n{1}", Response, base.ToString()); + } + } + + public partial class ApiException : ApiException + { + public TResult Result { get; private set; } + + public ApiException(string message, int statusCode, string response, System.Collections.Generic.IReadOnlyDictionary> headers, TResult result, System.Exception innerException) + : base(message, statusCode, response, headers, innerException) + { + Result = result; + } + } + +} diff --git a/src/NSwag.CodeGeneration.CSharp.Tests/Snapshots/ShipBob_OpenAPI.verified.txt b/src/NSwag.CodeGeneration.CSharp.Tests/Snapshots/ShipBob_OpenAPI.verified.txt new file mode 100644 index 000000000..8a1d67125 --- /dev/null +++ b/src/NSwag.CodeGeneration.CSharp.Tests/Snapshots/ShipBob_OpenAPI.verified.txt @@ -0,0 +1,14726 @@ + + +namespace MyNamespace +{ + using System = global::System; + + public partial class Client + { + #pragma warning disable 8618 + private string _baseUrl; + #pragma warning restore 8618 + + private System.Net.Http.HttpClient _httpClient; + private static System.Lazy _settings = new System.Lazy(CreateSerializerSettings, true); + private Newtonsoft.Json.JsonSerializerSettings _instanceSettings; + + #pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable. + public Client(System.Net.Http.HttpClient httpClient) + #pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable. + { + BaseUrl = "https://api.shipbob.com/2025-07"; + _httpClient = httpClient; + Initialize(); + } + + private static Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() + { + var settings = new Newtonsoft.Json.JsonSerializerSettings(); + UpdateJsonSerializerSettings(settings); + return settings; + } + + public string BaseUrl + { + get { return _baseUrl; } + set + { + _baseUrl = value; + if (!string.IsNullOrEmpty(_baseUrl) && !_baseUrl.EndsWith("/")) + _baseUrl += '/'; + } + } + + protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _instanceSettings ?? _settings.Value; } } + + static partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); + + partial void Initialize(); + + partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); + partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); + partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get channels + /// + /// The number of records to return per page. This parameter is used for pagination. If not provided, a default value will be used. + /// A cursor for pagination. This parameter is used to fetch the next set of results. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task C94a92715c0351cba55c1eff9c4649f2Async(int? recordsPerPage = null, string cursor = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "channel" + urlBuilder_.Append("channel"); + urlBuilder_.Append('?'); + if (recordsPerPage != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("RecordsPerPage")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(recordsPerPage, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (cursor != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("Cursor")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(cursor, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Unauthorized", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Forbidden", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get Subscriptions + /// + /// + /// This endpoint returns a list of webhook subscriptions. + /// + /// Number of webhooks returned per page in a paginated response. + /// The number of records to skip before starting to return the results. Used for pagination. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task E9181e4f0862d1d40e984035d6261bc9Async(double? recordsPerPage = null, string cursor = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "webhook" + urlBuilder_.Append("webhook"); + urlBuilder_.Append('?'); + if (recordsPerPage != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("RecordsPerPage")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(recordsPerPage, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (cursor != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("Cursor")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(cursor, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access right at this time", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Create Subscription + /// + /// + /// This endpoint creates a new webhook subscription. + /// + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _72e0c2d956e31774c876c58c53e8dce0Async(CreateSubscriptionRequest webhooks_V2_CreateSubscriptionRequest = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(webhooks_V2_CreateSubscriptionRequest, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "webhook" + urlBuilder_.Append("webhook"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access right at this time", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access", status_, responseText_, headers_, null); + } + else + if (status_ == 422) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Client Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Delete Subscription + /// + /// + /// This endpoint deletes a webhook subscription. + /// + /// This is the id of the webhook subscription to delete + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task Db62c75d5623351365b17c3d309b2745Async(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (id == null) + throw new System.ArgumentNullException("id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("DELETE"); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "webhook/{id}" + urlBuilder_.Append("webhook/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 204) + { + return; + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access right at this time", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Create a return + /// + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _729d0c0abc4835ba638c9a2a66ebc2d4Async(string shipbob_channel_id, CreateReturnRequest returns_CreateReturnRequest = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + + if (shipbob_channel_id == null) + throw new System.ArgumentNullException("shipbob_channel_id"); + request_.Headers.TryAddWithoutValidation("shipbob_channel_id", ConvertToString(shipbob_channel_id, System.Globalization.CultureInfo.InvariantCulture)); + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(returns_CreateReturnRequest, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "return" + urlBuilder_.Append("return"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + return; + } + else + if (status_ == 400) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Bad Request", status_, responseText_, headers_, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Authorization missing or invalid", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The provided credentials are not authorized to access this resource", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get Return Orders + /// + /// Channel Id for operation + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _09ca3f93325d9c169f4d54f2d37ee0b0Async(string ids = null, string referenceIds = null, string status = null, string fulfillmentCenterIds = null, string trackingNumbers = null, string originalShipmentIds = null, string inventoryIds = null, System.DateTimeOffset? startDate = null, System.DateTimeOffset? endDate = null, string returnTypes = null, string returnActions = null, string storeOrderIds = null, string sortBy = null, double? cursor = null, string limit = null, string sortOrder = null, System.DateTimeOffset? completedStartDate = null, System.DateTimeOffset? completedEndDate = null, string shipbob_channel_id = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + + if (shipbob_channel_id != null) + request_.Headers.TryAddWithoutValidation("shipbob_channel_id", ConvertToString(shipbob_channel_id, System.Globalization.CultureInfo.InvariantCulture)); + request_.Method = new System.Net.Http.HttpMethod("GET"); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "return" + urlBuilder_.Append("return"); + urlBuilder_.Append('?'); + if (ids != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("Ids")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(ids, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (referenceIds != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("ReferenceIds")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(referenceIds, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (status != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("Status")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(status, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (fulfillmentCenterIds != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("FulfillmentCenterIds")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(fulfillmentCenterIds, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (trackingNumbers != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("TrackingNumbers")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(trackingNumbers, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (originalShipmentIds != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("OriginalShipmentIds")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(originalShipmentIds, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (inventoryIds != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("InventoryIds")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(inventoryIds, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (startDate != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("StartDate")).Append('=').Append(System.Uri.EscapeDataString(startDate.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (endDate != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("EndDate")).Append('=').Append(System.Uri.EscapeDataString(endDate.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (returnTypes != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("ReturnTypes")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(returnTypes, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (returnActions != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("ReturnActions")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(returnActions, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (storeOrderIds != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("StoreOrderIds")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(storeOrderIds, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (sortBy != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("SortBy")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(sortBy, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (cursor != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("Cursor")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(cursor, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (limit != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("Limit")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(limit, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (sortOrder != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("SortOrder")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(sortOrder, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (completedStartDate != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("CompletedStartDate")).Append('=').Append(System.Uri.EscapeDataString(completedStartDate.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (completedEndDate != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("CompletedEndDate")).Append('=').Append(System.Uri.EscapeDataString(completedEndDate.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + return; + } + else + if (status_ == 400) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Bad Request", status_, responseText_, headers_, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Authorization missing or invalid", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The provided credentials are not authorized to access this resource", status_, responseText_, headers_, null); + } + else + if (status_ == 404) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Resource Not Found", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get Return Order + /// + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _7c1ecda086f397c4c23722abb27926ceAsync(string id, string shipbob_channel_id = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (id == null) + throw new System.ArgumentNullException("id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + + if (shipbob_channel_id != null) + request_.Headers.TryAddWithoutValidation("shipbob_channel_id", ConvertToString(shipbob_channel_id, System.Globalization.CultureInfo.InvariantCulture)); + request_.Method = new System.Net.Http.HttpMethod("GET"); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "return/{id}" + urlBuilder_.Append("return/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + return; + } + else + if (status_ == 400) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Bad Request", status_, responseText_, headers_, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Authorization missing or invalid", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The provided credentials are not authorized to access this resource", status_, responseText_, headers_, null); + } + else + if (status_ == 404) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Resource Not Found", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Modify Return Order + /// + /// Id of the return order + /// Channel Id for Operation + /// Model defining the return + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _8fd3220063faa081315dc98002f9fac8Async(string id, string shipbob_channel_id, CreateReturnViewModel returns_CreateReturnViewModel = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (id == null) + throw new System.ArgumentNullException("id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + + if (shipbob_channel_id == null) + throw new System.ArgumentNullException("shipbob_channel_id"); + request_.Headers.TryAddWithoutValidation("shipbob_channel_id", ConvertToString(shipbob_channel_id, System.Globalization.CultureInfo.InvariantCulture)); + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(returns_CreateReturnViewModel, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("PUT"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "return/{id}" + urlBuilder_.Append("return/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Authorization missing or invalid", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The provided credentials are not authorized to access this resource", status_, responseText_, headers_, null); + } + else + if (status_ == 422) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Client Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Cancel Return Order + /// + /// Id of the return order + /// Channel Id for Operation + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _029f09f17effabfd265e8a247d48ec04Async(string id, string shipbob_channel_id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (id == null) + throw new System.ArgumentNullException("id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + + if (shipbob_channel_id == null) + throw new System.ArgumentNullException("shipbob_channel_id"); + request_.Headers.TryAddWithoutValidation("shipbob_channel_id", ConvertToString(shipbob_channel_id, System.Globalization.CultureInfo.InvariantCulture)); + request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "return/{id}:cancel" + urlBuilder_.Append("return/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append(":cancel"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Authorization missing or invalid", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The provided credentials are not authorized to access this resource", status_, responseText_, headers_, null); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 422) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Client Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get Fulfillment Centers + /// + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> Cfcf6f1549cfdc2bf1779a3a205bd64eAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "fulfillment-center" + urlBuilder_.Append("fulfillment-center"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Authorization missing or invalid", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The provided credentials are not authorized to access this resource", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get Warehouse Receiving Order + /// + /// Id of the receiving order + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _072a989bfe11161281fbfbbfb2aedf97Async(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (id == null) + throw new System.ArgumentNullException("id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "receiving/{id}" + urlBuilder_.Append("receiving/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Authorization missing or invalid", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The provided credentials are not authorized to access this resource", status_, responseText_, headers_, null); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get Multiple Warehouse Receiving Orders + /// + /// Page of WROs to get + /// Number of WROs per page to request + /// Comma separated list of WRO IDs to filter by + /// Comma separated list of WRO statuses to filter by + /// Earliest date that a WRO was created + /// Latest date that a WRO was created + /// Comma separated list of WRO fulfillment center IDs to filter by + /// Comma separated list of WRO PO numbers to filter by + /// Flag to return external_sync_timestamp WROs + /// Earliest date that a WRO was completed + /// Latest date that a WRO was completed + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> _10c13128d7c5683408869c462ab45747Async(string page = null, string limit = null, string iDs = null, string statuses = null, System.DateTimeOffset? insertStartDate = null, System.DateTimeOffset? insertEndDate = null, string fulfillmentCenterIds = null, string purchaseOrderNumbers = null, bool? externalSync = null, System.DateTimeOffset? completedStartDate = null, System.DateTimeOffset? completedEndDate = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "receiving" + urlBuilder_.Append("receiving"); + urlBuilder_.Append('?'); + if (page != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("Page")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(page, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (limit != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("Limit")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(limit, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (iDs != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("IDs")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(iDs, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (statuses != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("Statuses")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(statuses, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (insertStartDate != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("InsertStartDate")).Append('=').Append(System.Uri.EscapeDataString(insertStartDate.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (insertEndDate != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("InsertEndDate")).Append('=').Append(System.Uri.EscapeDataString(insertEndDate.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (fulfillmentCenterIds != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("FulfillmentCenterIds")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(fulfillmentCenterIds, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (purchaseOrderNumbers != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("PurchaseOrderNumbers")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(purchaseOrderNumbers, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (externalSync != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("ExternalSync")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(externalSync, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (completedStartDate != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("CompletedStartDate")).Append('=').Append(System.Uri.EscapeDataString(completedStartDate.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (completedEndDate != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("CompletedEndDate")).Append('=').Append(System.Uri.EscapeDataString(completedEndDate.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Authorization missing or invalid", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The provided credentials are not authorized to access this resource", status_, responseText_, headers_, null); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Create Warehouse Receiving Order + /// + /// The receiving order to create + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _85ab9844ebc2ac76db634108b022ff32Async(CreateReceivingOrderModel receiving_CreateReceivingOrderModel = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(receiving_CreateReceivingOrderModel, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "receiving" + urlBuilder_.Append("receiving"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 201) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Authorization missing or invalid", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The provided credentials are not authorized to access this resource", status_, responseText_, headers_, null); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get Warehouse Receiving Order Box Labels + /// + /// Id of the receiving order + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task Cbec9819f5c4be876e3dcaa0da85cdb2Async(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (id == null) + throw new System.ArgumentNullException("id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "receiving/{id}/labels" + urlBuilder_.Append("receiving/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/labels"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Authorization missing or invalid", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The provided credentials are not authorized to access this resource", status_, responseText_, headers_, null); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Cancel Warehouse Receiving Order + /// + /// Id of the receiving order to cancel + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task Fd48aac656a1677b6a137403d3c7dcfdAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (id == null) + throw new System.ArgumentNullException("id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "receiving/{id}:cancel" + urlBuilder_.Append("receiving/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append(":cancel"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Authorization missing or invalid", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The provided credentials are not authorized to access this resource", status_, responseText_, headers_, null); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 422) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Client Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Set ExternalSync flag for Wros + /// + /// The list of wro ids and a flag to enable external sync + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _87c43ca241c729ef7cf480743d698075Async(UpdateExternalSyncModel receiving_UpdateExternalSyncModel = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(receiving_UpdateExternalSyncModel, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "receiving:setExternalSync" + urlBuilder_.Append("receiving:setExternalSync"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Authorization missing or invalid", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The provided credentials are not authorized to access this resource", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get Warehouse Receiving Order Boxes + /// + /// Id of the receiving order + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> _68137184cc716d056a7a3f336d0a9851Async(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (id == null) + throw new System.ArgumentNullException("id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "receiving/{id}/boxes" + urlBuilder_.Append("receiving/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/boxes"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Authorization missing or invalid", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The provided credentials are not authorized to access this resource", status_, responseText_, headers_, null); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get logs for one Shipment by Shipment Id + /// + /// The shipment id to get + /// Channel Id for Operation + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> Aefaa6a540d93e2dea0584a6fb69fad5Async(string shipmentId, string shipbob_channel_id = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (shipmentId == null) + throw new System.ArgumentNullException("shipmentId"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + + if (shipbob_channel_id != null) + request_.Headers.TryAddWithoutValidation("shipbob_channel_id", ConvertToString(shipbob_channel_id, System.Globalization.CultureInfo.InvariantCulture)); + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "shipment/{shipmentId}/logs" + urlBuilder_.Append("shipment/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(shipmentId, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/logs"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access right at this time", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access", status_, responseText_, headers_, null); + } + else + if (status_ == 404) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Not Found", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get logs for one Shipment by Order Id and Shipment Id + /// + /// The order id to get the shipment for + /// The shipment id to get + /// Channel Id for Operation + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> _6930420ba86513c3cfa5f0af2ad98526Async(string orderId, string shipmentId, string shipbob_channel_id = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (orderId == null) + throw new System.ArgumentNullException("orderId"); + + if (shipmentId == null) + throw new System.ArgumentNullException("shipmentId"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + + if (shipbob_channel_id != null) + request_.Headers.TryAddWithoutValidation("shipbob_channel_id", ConvertToString(shipbob_channel_id, System.Globalization.CultureInfo.InvariantCulture)); + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "order/{orderId}/shipment/{shipmentId}/logs" + urlBuilder_.Append("order/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(orderId, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/shipment/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(shipmentId, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/logs"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access right at this time", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access", status_, responseText_, headers_, null); + } + else + if (status_ == 404) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Not Found", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Create Order + /// + /// Channel Id for Operation + /// Created + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _014d459354b1309064ac8ab6993c7394Async(string shipbob_channel_id, CreateOrderModel orders_CreateOrderModel = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + + if (shipbob_channel_id == null) + throw new System.ArgumentNullException("shipbob_channel_id"); + request_.Headers.TryAddWithoutValidation("shipbob_channel_id", ConvertToString(shipbob_channel_id, System.Globalization.CultureInfo.InvariantCulture)); + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(orders_CreateOrderModel, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "order" + urlBuilder_.Append("order"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 201) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access right at this time", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access", status_, responseText_, headers_, null); + } + else + if (status_ == 422) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Client Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get Orders + /// + /// + /// All parameters are AND filters + /// + /// Page of orders to get + /// Amount of orders per page to request + /// order ids to filter by, comma separated <br /><strong>Example:</strong> ?IDs=1,2 + /// Reference ids to filter by, comma separated <br /><strong>Example:</strong> ?ReferenceIds=Ref1,Ref2 + /// Start date to filter orders inserted later than + /// End date to filter orders inserted earlier than + /// Order to sort results in + /// Has any portion of this order been assigned a tracking number + /// Start date to filter orders updated later than + /// End date to filter orders updated later than + /// Filter orders that their tracking information was fully uploaded + /// Start date to filter orders with tracking updates later than the supplied date. Will only return orders that have tracking information + /// End date to filter orders updated later than the supplied date. Will only return orders that have tracking information + /// Channel Id for Operation + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> B104a65e90eefe2b42929142ce7c1b99Async(double? page = null, double? limit = null, string iDs = null, string referenceIds = null, System.DateTimeOffset? startDate = null, System.DateTimeOffset? endDate = null, string sortOrder = null, bool? hasTracking = null, System.DateTimeOffset? lastUpdateStartDate = null, System.DateTimeOffset? lastUpdateEndDate = null, bool? isTrackingUploaded = null, System.DateTimeOffset? lastTrackingUpdateStartDate = null, System.DateTimeOffset? lastTrackingUpdateEndDate = null, string shipbob_channel_id = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + + if (shipbob_channel_id != null) + request_.Headers.TryAddWithoutValidation("shipbob_channel_id", ConvertToString(shipbob_channel_id, System.Globalization.CultureInfo.InvariantCulture)); + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "order" + urlBuilder_.Append("order"); + urlBuilder_.Append('?'); + if (page != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("Page")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(page, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (limit != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("Limit")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(limit, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (iDs != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("IDs")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(iDs, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (referenceIds != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("ReferenceIds")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(referenceIds, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (startDate != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("StartDate")).Append('=').Append(System.Uri.EscapeDataString(startDate.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (endDate != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("EndDate")).Append('=').Append(System.Uri.EscapeDataString(endDate.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (sortOrder != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("SortOrder")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(sortOrder, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (hasTracking != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("HasTracking")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(hasTracking, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (lastUpdateStartDate != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("LastUpdateStartDate")).Append('=').Append(System.Uri.EscapeDataString(lastUpdateStartDate.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (lastUpdateEndDate != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("LastUpdateEndDate")).Append('=').Append(System.Uri.EscapeDataString(lastUpdateEndDate.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (isTrackingUploaded != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("IsTrackingUploaded")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(isTrackingUploaded, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (lastTrackingUpdateStartDate != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("LastTrackingUpdateStartDate")).Append('=').Append(System.Uri.EscapeDataString(lastTrackingUpdateStartDate.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (lastTrackingUpdateEndDate != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("LastTrackingUpdateEndDate")).Append('=').Append(System.Uri.EscapeDataString(lastTrackingUpdateEndDate.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access right at this time", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get one Shipment by Order Id and Shipment Id + /// + /// The order id to get the shipment for + /// The shipment id to get + /// Channel Id for Operation + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _4a91e4ebbcfdf842cefb9a16c69cd278Async(string orderId, string shipmentId, string shipbob_channel_id = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (orderId == null) + throw new System.ArgumentNullException("orderId"); + + if (shipmentId == null) + throw new System.ArgumentNullException("shipmentId"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + + if (shipbob_channel_id != null) + request_.Headers.TryAddWithoutValidation("shipbob_channel_id", ConvertToString(shipbob_channel_id, System.Globalization.CultureInfo.InvariantCulture)); + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "order/{orderId}/shipment/{shipmentId}" + urlBuilder_.Append("order/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(orderId, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/shipment/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(shipmentId, System.Globalization.CultureInfo.InvariantCulture))); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access right at this time", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access", status_, responseText_, headers_, null); + } + else + if (status_ == 404) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Not Found", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get one Shipment's status timeline by Order Id and Shipment Id + /// + /// The order id to get the shipment for + /// The shipment id to get + /// Channel Id for Operation + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> _46a877cb09f66372f7381c7086049150Async(string orderId, string shipmentId, string shipbob_channel_id = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (orderId == null) + throw new System.ArgumentNullException("orderId"); + + if (shipmentId == null) + throw new System.ArgumentNullException("shipmentId"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + + if (shipbob_channel_id != null) + request_.Headers.TryAddWithoutValidation("shipbob_channel_id", ConvertToString(shipbob_channel_id, System.Globalization.CultureInfo.InvariantCulture)); + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "order/{orderId}/shipment/{shipmentId}/timeline" + urlBuilder_.Append("order/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(orderId, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/shipment/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(shipmentId, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/timeline"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access right at this time", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access", status_, responseText_, headers_, null); + } + else + if (status_ == 404) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Not Found", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get one Shipment by Shipment Id + /// + /// The shipment id to get + /// Channel Id for Operation + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _8c8639205c363bf5fcc5b147c40ccfe5Async(string shipmentId, string shipbob_channel_id = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (shipmentId == null) + throw new System.ArgumentNullException("shipmentId"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + + if (shipbob_channel_id != null) + request_.Headers.TryAddWithoutValidation("shipbob_channel_id", ConvertToString(shipbob_channel_id, System.Globalization.CultureInfo.InvariantCulture)); + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "shipment/{shipmentId}" + urlBuilder_.Append("shipment/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(shipmentId, System.Globalization.CultureInfo.InvariantCulture))); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access right at this time", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access", status_, responseText_, headers_, null); + } + else + if (status_ == 404) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Not Found", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get one Shipment's status timeline by Shipment Id + /// + /// The shipment id to get + /// Channel Id for Operation + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> _92be75123ea13c356384d555d0863147Async(string shipmentId, string shipbob_channel_id = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (shipmentId == null) + throw new System.ArgumentNullException("shipmentId"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + + if (shipbob_channel_id != null) + request_.Headers.TryAddWithoutValidation("shipbob_channel_id", ConvertToString(shipbob_channel_id, System.Globalization.CultureInfo.InvariantCulture)); + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "shipment/{shipmentId}/timeline" + urlBuilder_.Append("shipment/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(shipmentId, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/timeline"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access right at this time", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access", status_, responseText_, headers_, null); + } + else + if (status_ == 404) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Not Found", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get all Shipments for Order + /// + /// The order id to get shipments for + /// Channel Id for Operation + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> _1e0815dcfb1c817c448dfd569dbe8c21Async(string orderId, string shipbob_channel_id = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (orderId == null) + throw new System.ArgumentNullException("orderId"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + + if (shipbob_channel_id != null) + request_.Headers.TryAddWithoutValidation("shipbob_channel_id", ConvertToString(shipbob_channel_id, System.Globalization.CultureInfo.InvariantCulture)); + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "order/{orderId}/shipment" + urlBuilder_.Append("order/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(orderId, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/shipment"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access right at this time", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access", status_, responseText_, headers_, null); + } + else + if (status_ == 404) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Not Found", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get Order + /// + /// Channel Id for Operation + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task Ec2804df94cd56f5f33114c7b1475772Async(string orderId, string shipbob_channel_id = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (orderId == null) + throw new System.ArgumentNullException("orderId"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + + if (shipbob_channel_id != null) + request_.Headers.TryAddWithoutValidation("shipbob_channel_id", ConvertToString(shipbob_channel_id, System.Globalization.CultureInfo.InvariantCulture)); + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "order/{orderId}" + urlBuilder_.Append("order/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(orderId, System.Globalization.CultureInfo.InvariantCulture))); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access right at this time", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access", status_, responseText_, headers_, null); + } + else + if (status_ == 404) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Not Found", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get locations + /// + /// Whether the inactive locations should be included or not + /// Return all the receiving enabled locations + /// Return all the access granted locations + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> E2b9a3ad50680b3e2ab41cb8636790e4Async(bool? includeInactive = null, bool? receivingEnabled = null, bool? accessGranted = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "location" + urlBuilder_.Append("location"); + urlBuilder_.Append('?'); + if (includeInactive != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("IncludeInactive")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (receivingEnabled != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("ReceivingEnabled")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(receivingEnabled, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (accessGranted != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("AccessGranted")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(accessGranted, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Authorization missing or invalid", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The provided credentials are not authorized to access this resource", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Gets Packaging Requirement + /// + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> _672942b09322e1990e33ef572188ad73Async(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "packaging-requirement" + urlBuilder_.Append("packaging-requirement"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Used to merge two or more variants together + /// + /// The ID of the variant to use as the merge target + /// The variants that should be merged to the target variant + /// Created + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _089b4461bf637cc52135f10eaf8f02a9Async(string variantId, System.Collections.Generic.IEnumerable products_MergeVariantRequestModelArray = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (variantId == null) + throw new System.ArgumentNullException("variantId"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(products_MergeVariantRequestModelArray, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "variant/{variantId}:merge" + urlBuilder_.Append("variant/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(variantId, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append(":merge"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 201) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Gets Taxonomy Parent + /// + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _09c013ed682b50f3d16234d4c69f519bAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (id == null) + throw new System.ArgumentNullException("id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "taxonomy/{id}/parent" + urlBuilder_.Append("taxonomy/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/parent"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 401) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Unauthorized", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 403) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Forbidden", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 500) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Server Error", status_, responseText_, headers_, null); + } + else + if (status_ == 503) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Server Error", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Update a single product with Json Merge Patch functionality + /// + /// + /// Updates a single product. This endpoint supports Json Merge Patch functionality, which allows partial updates to be made to the product. The endpoint will only update the fields that are provided in the request. For updating variants, you mnust include the ID of the variant that you would like to update. + /// + /// The product identifier + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _2dd7afd0ffe30df53fe295964e471abcAsync(string productId, UpdateProductRequestModelV5 products_UpdateProductRequestModelV5 = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (productId == null) + throw new System.ArgumentNullException("productId"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(products_UpdateProductRequestModelV5, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("PATCH"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "product/{productId}" + urlBuilder_.Append("product/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(productId, System.Globalization.CultureInfo.InvariantCulture))); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Gets Product by Id + /// + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _9d82d40f4758612d28c98612ce997debAsync(string productId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (productId == null) + throw new System.ArgumentNullException("productId"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "product/{productId}" + urlBuilder_.Append("product/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(productId, System.Globalization.CultureInfo.InvariantCulture))); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Deletes Bundle and removes associations to related products + /// + /// The product identifier + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task Dff42dc941ad7015e0ef589a5df04a41Async(string productId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (productId == null) + throw new System.ArgumentNullException("productId"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("DELETE"); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "product/{productId}" + urlBuilder_.Append("product/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(productId, System.Globalization.CultureInfo.InvariantCulture))); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + return; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Migrates variants to existing product + /// + /// Migration definition + /// Created + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task A3869424cb29a4540a3c8890462b4704Async(string productId, MigrateVariantRequestModel products_MigrateVariantRequestModel = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (productId == null) + throw new System.ArgumentNullException("productId"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(products_MigrateVariantRequestModel, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "product/{productId}:moveVariants" + urlBuilder_.Append("product/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(productId, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append(":moveVariants"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 201) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Add new product variants to a product + /// + /// The variant request that is to be converted to bundle + /// Created + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _0386f51f54514a8488c3b7e914220abaAsync(string variantId, ConvertVariantToBundleRequest products_ConvertVariantToBundleRequest = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (variantId == null) + throw new System.ArgumentNullException("variantId"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(products_ConvertVariantToBundleRequest, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "variant/{variantId}:convertToBundle" + urlBuilder_.Append("variant/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(variantId, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append(":convertToBundle"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 201) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Gets Taxonomy by Id + /// + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _45c19cd89efa4b89bc9c93f3d443f77cAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (id == null) + throw new System.ArgumentNullException("id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "taxonomy/{id}" + urlBuilder_.Append("taxonomy/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 401) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Unauthorized", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 403) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Forbidden", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 500) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Server Error", status_, responseText_, headers_, null); + } + else + if (status_ == 503) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Server Error", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Update specific channel metadata record from a variant by channel metadata ID + /// + /// The ID of the variant to update the metadata from + /// The ID of the channel metadata record to update + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _90aa9021b19d7789681a49b76d79703dAsync(string variantId, string channelMetadataId, AmazonChannelMetadataRequestModel products_Put_Api_V5_Variant_VariantId_Channel_Metadata_ChannelMetadataId_Request_OneOf_AmazonChannelMetadataRequestModel_BaseChannelMetadataRequestModel_BigCommerceChannelMetadataRequestModel_ShopifyChannelMetadataRequestModel = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (variantId == null) + throw new System.ArgumentNullException("variantId"); + + if (channelMetadataId == null) + throw new System.ArgumentNullException("channelMetadataId"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(products_Put_Api_V5_Variant_VariantId_Channel_Metadata_ChannelMetadataId_Request_OneOf_AmazonChannelMetadataRequestModel_BaseChannelMetadataRequestModel_BigCommerceChannelMetadataRequestModel_ShopifyChannelMetadataRequestModel, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("PUT"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "variant/{variantId}/channel-metadata/{channelMetadataId}" + urlBuilder_.Append("variant/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(variantId, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/channel-metadata/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(channelMetadataId, System.Globalization.CultureInfo.InvariantCulture))); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Used to delete a specific channel metadata record from a variant by channel metadata ID + /// + /// The ID of the variant to remove the metadata from + /// The ID of the channel metadata record to delete + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task B48e74188d2b119e672f2ea93f9b96c6Async(string variantId, string channelMetadataId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (variantId == null) + throw new System.ArgumentNullException("variantId"); + + if (channelMetadataId == null) + throw new System.ArgumentNullException("channelMetadataId"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("DELETE"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "variant/{variantId}/channel-metadata/{channelMetadataId}" + urlBuilder_.Append("variant/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(variantId, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/channel-metadata/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(channelMetadataId, System.Globalization.CultureInfo.InvariantCulture))); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Create a new Channel Metadata Entry for a given Variant + /// + /// Created + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _16bdf05dd87417fa58047a46bb481f61Async(string variantId, AmazonChannelMetadataRequestModel products_Post_Api_V5_Variant_VariantId_Channel_Metadata_Request_OneOf_AmazonChannelMetadataRequestModel_BaseChannelMetadataRequestModel_BigCommerceChannelMetadataRequestModel_ShopifyChannelMetadataRequestModel = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (variantId == null) + throw new System.ArgumentNullException("variantId"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(products_Post_Api_V5_Variant_VariantId_Channel_Metadata_Request_OneOf_AmazonChannelMetadataRequestModel_BaseChannelMetadataRequestModel_BigCommerceChannelMetadataRequestModel_ShopifyChannelMetadataRequestModel, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "variant/{variantId}/channel-metadata" + urlBuilder_.Append("variant/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(variantId, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/channel-metadata"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 201) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Migrates existing variants to a new product + /// + /// Migration definition + /// Created + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task D88155a65d5492b57f4cf1d9b2351989Async(MigrateVariantRequestModel products_MigrateVariantRequestModel = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(products_MigrateVariantRequestModel, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "product:moveVariants" + urlBuilder_.Append("product:moveVariants"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 201) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Gets multiple product variants + /// + /// The product id + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> D7b5853f4a24d00f149fbe297ee11e5bAsync(string productId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (productId == null) + throw new System.ArgumentNullException("productId"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "product/{productId}/variants" + urlBuilder_.Append("product/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(productId, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/variants"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Adds new product variants to a product + /// + /// The product variants to add to product + /// Created + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _14daa5e4386442d68fbf15d81ca67beaAsync(string productId, System.Collections.Generic.IEnumerable products_CreateProductVariantRequestModelV5Array = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (productId == null) + throw new System.ArgumentNullException("productId"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(products_CreateProductVariantRequestModelV5Array, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "product/{productId}/variants" + urlBuilder_.Append("product/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(productId, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/variants"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 201) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Updates multiple product variants + /// + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> _16364e8117703570686434e0b3ba7abeAsync(string productId, UpdateProductVariantModelV5 products_UpdateProductVariantModelV5 = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (productId == null) + throw new System.ArgumentNullException("productId"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(products_UpdateProductVariantModelV5, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("PATCH"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "product/{productId}/variants" + urlBuilder_.Append("product/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(productId, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/variants"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Create single product to the store + /// + /// The product to add + /// Created + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _0c4a773215d74006c7062e138ae1b94eAsync(CreateProductRequestModelV5 products_CreateProductRequestModelV5 = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(products_CreateProductRequestModelV5, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "product" + urlBuilder_.Append("product"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 201) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Retrieves List of Products based on filters provided + /// + /// Search Products by name, sku, inventory id or product Id. + /// Barcode Associated with variant + /// Barcodes Associated with variant + /// List of Category Ids associated with product + /// Looks for Products variants by their channel IDs + /// Looks for Products with/without digital variants + /// Looks for Products with/without variants + /// Looks for variants by its associated inventory id + /// Looks for Products variants by their IsInventorySyncEnabled is true + /// Looks for Products that have been updated since the given date + /// Looks for Products with by Legacy Product Id(s) + /// Looks for Products/Variants by name + /// Looks for Products with inventory + /// Looks for Products variants by their external Platform IDs + /// Looks for Products with an assigned Id + /// Looks for Products by type + /// Looks for Products by ReviewsPending + /// Looks for Products variants assigned to a platform/sales channel + /// Looks for Products that match the provided Seller query + /// Looks for Products that match the provided Sku query + /// Looks for Products variants by their taxonomy id or any descendants of the taxonomies sent separated by comma + /// Looks for products that contain a variant with the given ID + /// Looks for Products with variants that contain provided status + /// 1-250 + /// Id, Name, Category, TotalOnHandQty + /// ASC,DESC + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _5e4fe606de2077dfa918ff128f5bbfffAsync(string search = null, string barcode = null, string barcodes = null, string categoryIds = null, string channelIds = null, string hasDigitalVariants = null, string hasVariants = null, string inventoryId = null, string isInventorySyncEnabled = null, string lastUpdatedTimestamp = null, string legacyIds = null, string name = null, string onHand = null, string platformIds = null, string productId = null, string productType = null, string reviewsPending = null, string salesChannel = null, string sellerSKU = null, string sKU = null, string taxonomyIds = null, string variantId = null, string variantStatus = null, string pageSize = null, string sortBy = null, string sortOrder = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "product" + urlBuilder_.Append("product"); + urlBuilder_.Append('?'); + if (search != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("Search")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(search, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (barcode != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("Barcode")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(barcode, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (barcodes != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("Barcodes")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(barcodes, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (categoryIds != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("CategoryIds")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(categoryIds, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (channelIds != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("ChannelIds")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(channelIds, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (hasDigitalVariants != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("HasDigitalVariants")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(hasDigitalVariants, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (hasVariants != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("HasVariants")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(hasVariants, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (inventoryId != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("InventoryId")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(inventoryId, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (isInventorySyncEnabled != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("IsInventorySyncEnabled")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(isInventorySyncEnabled, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (lastUpdatedTimestamp != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("LastUpdatedTimestamp")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(lastUpdatedTimestamp, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (legacyIds != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("LegacyIds")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(legacyIds, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (name != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("Name")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(name, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (onHand != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("OnHand")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(onHand, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (platformIds != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("PlatformIds")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(platformIds, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (productId != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("ProductId")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(productId, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (productType != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("ProductType")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(productType, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (reviewsPending != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("ReviewsPending")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(reviewsPending, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (salesChannel != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("SalesChannel")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(salesChannel, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (sellerSKU != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("SellerSKU")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(sellerSKU, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (sKU != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("SKU")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(sKU, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (taxonomyIds != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("TaxonomyIds")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(taxonomyIds, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (variantId != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("VariantId")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(variantId, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (variantStatus != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("VariantStatus")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(variantStatus, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (pageSize != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("PageSize")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(pageSize, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (sortBy != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("SortBy")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(sortBy, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (sortOrder != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("SortOrder")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(sortOrder, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Gets Taxonomy + /// + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> _261e342a8a9514a5c30d6321ef4ff2c2Async(string search = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "taxonomy" + urlBuilder_.Append("taxonomy"); + urlBuilder_.Append('?'); + if (search != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("search")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(search, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 401) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Unauthorized", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 403) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Forbidden", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 500) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Server Error", status_, responseText_, headers_, null); + } + else + if (status_ == 503) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Server Error", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get All Inventories + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _55ea81cc486b4660a8c518109ef38becAsync(string searchBy = null, string filterOperations = null, string inventoryIds = null, bool? isActive = null, bool? isDigital = null, string pageSize = null, string sortBy = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "inventory" + urlBuilder_.Append("inventory"); + urlBuilder_.Append('?'); + if (searchBy != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("SearchBy")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(searchBy, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (filterOperations != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("FilterOperations")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(filterOperations, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (inventoryIds != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("InventoryIds")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(inventoryIds, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (isActive != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("IsActive")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(isActive, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (isDigital != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("IsDigital")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(isDigital, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (pageSize != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("PageSize")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(pageSize, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (sortBy != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("SortBy")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(sortBy, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Unauthorized", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 403) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Forbidden", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 500) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Internal Server Error", status_, responseText_, headers_, null); + } + else + if (status_ == 503) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Service Unavailable", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get Inventory + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _588a8bb9e4086c9f6a2bf1bf3d4beb55Async(string inventoryId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (inventoryId == null) + throw new System.ArgumentNullException("inventoryId"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "inventory/{inventoryId}" + urlBuilder_.Append("inventory/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(inventoryId, System.Globalization.CultureInfo.InvariantCulture))); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Unauthorized", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 403) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Forbidden", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 500) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Internal Server Error", status_, responseText_, headers_, null); + } + else + if (status_ == 503) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Service Unavailable", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get Inventory Levels + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _5b9cfd1450a84019e5dac4ebf0ea9259Async(string inventoryId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (inventoryId == null) + throw new System.ArgumentNullException("inventoryId"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "inventory-level/{inventoryId}" + urlBuilder_.Append("inventory-level/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(inventoryId, System.Globalization.CultureInfo.InvariantCulture))); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Unauthorized", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 403) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Forbidden", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 500) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Internal Server Error", status_, responseText_, headers_, null); + } + else + if (status_ == 503) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Service Unavailable", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get All Inventory Levels + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task B4a2f3342be39dee2ab660584ebab083Async(string searchBy = null, string inventoryIds = null, bool? isActive = null, bool? isDigital = null, string pageSize = null, string sortBy = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "inventory-level" + urlBuilder_.Append("inventory-level"); + urlBuilder_.Append('?'); + if (searchBy != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("SearchBy")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(searchBy, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (inventoryIds != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("InventoryIds")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(inventoryIds, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (isActive != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("IsActive")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(isActive, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (isDigital != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("IsDigital")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(isDigital, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (pageSize != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("PageSize")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(pageSize, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (sortBy != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("SortBy")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(sortBy, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Unauthorized", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 403) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Forbidden", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 500) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Internal Server Error", status_, responseText_, headers_, null); + } + else + if (status_ == 503) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Service Unavailable", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get All Inventory Levels Grouped By Fulfillment Center + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _5f12efb2a1517dff2926d5841c57948dAsync(string locationType = null, string locationId = null, string searchBy = null, string inventoryIds = null, bool? isActive = null, bool? isDigital = null, string pageSize = null, string sortBy = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "inventory-level/locations" + urlBuilder_.Append("inventory-level/locations"); + urlBuilder_.Append('?'); + if (locationType != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("LocationType")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(locationType, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (locationId != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("LocationId")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(locationId, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (searchBy != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("SearchBy")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(searchBy, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (inventoryIds != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("InventoryIds")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(inventoryIds, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (isActive != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("IsActive")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(isActive, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (isDigital != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("IsDigital")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(isDigital, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (pageSize != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("PageSize")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(pageSize, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (sortBy != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("SortBy")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(sortBy, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Unauthorized", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 403) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Forbidden", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 500) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Internal Server Error", status_, responseText_, headers_, null); + } + else + if (status_ == 503) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Service Unavailable", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get All Inventory Levels Grouped By Lot + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _75137f9e260840bd8493ddb513efe4f4Async(string locationId = null, string searchBy = null, string inventoryIds = null, bool? isActive = null, bool? isDigital = null, string pageSize = null, string sortBy = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "inventory-level/lots" + urlBuilder_.Append("inventory-level/lots"); + urlBuilder_.Append('?'); + if (locationId != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("LocationId")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(locationId, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (searchBy != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("SearchBy")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(searchBy, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (inventoryIds != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("InventoryIds")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(inventoryIds, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (isActive != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("IsActive")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(isActive, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (isDigital != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("IsDigital")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(isDigital, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (pageSize != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("PageSize")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(pageSize, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (sortBy != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("SortBy")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(sortBy, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Unauthorized", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 403) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Forbidden", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 500) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Internal Server Error", status_, responseText_, headers_, null); + } + else + if (status_ == 503) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Service Unavailable", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get Inventory Levels Grouped By Lot + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _4abdcbec15589f2ac52f6e26221a8cf3Async(string inventoryId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (inventoryId == null) + throw new System.ArgumentNullException("inventoryId"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "inventory-level/{inventoryId}/lots" + urlBuilder_.Append("inventory-level/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(inventoryId, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/lots"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Unauthorized", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 403) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Forbidden", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 500) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Internal Server Error", status_, responseText_, headers_, null); + } + else + if (status_ == 503) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Service Unavailable", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get Inventory Levels Grouped By Fulfillment Center + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _02c3d358d738d964e4660c65e9d1beb8Async(string inventoryId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (inventoryId == null) + throw new System.ArgumentNullException("inventoryId"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "inventory-level/{inventoryId}/locations" + urlBuilder_.Append("inventory-level/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(inventoryId, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/locations"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Unauthorized", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 403) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Forbidden", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 500) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Internal Server Error", status_, responseText_, headers_, null); + } + else + if (status_ == 503) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Service Unavailable", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get Invoices + /// + /// + /// Gets a paginated list of invoices, optionally filtered by invoice types and date range + /// + /// [Optional] A pagination token used to jump to first, last, next or previous pages. When supplied, it overrides all other filter parameters. + /// [Optional] Start date for filtering invoices by invoice date. + /// [Optional] End date for filtering invoices by invoice date. + /// [Optional] Filter invoices by invoice type. Valid values: Shipping,WarehouseStorage,Inbound Fee,Return,AdditionalFee,Credits + /// Number of invoices to return per page (default: 100). Must be between 1 and 1000. + /// Sort invoices by Invoice Date. Values - Ascending, Descending. Default: Descending. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _82489ce93a8051f0db08726951ab8c5eAsync(string cursor = null, System.DateTimeOffset? fromDate = null, System.DateTimeOffset? toDate = null, System.Collections.Generic.IEnumerable invoiceTypes = null, double? pageSize = null, string sortOrder = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "invoices" + urlBuilder_.Append("invoices"); + urlBuilder_.Append('?'); + if (cursor != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("Cursor")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(cursor, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (fromDate != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("FromDate")).Append('=').Append(System.Uri.EscapeDataString(fromDate.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (toDate != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("ToDate")).Append('=').Append(System.Uri.EscapeDataString(toDate.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (invoiceTypes != null) + { + foreach (var item_ in invoiceTypes) { urlBuilder_.Append(System.Uri.EscapeDataString("InvoiceTypes")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); } + } + if (pageSize != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("PageSize")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(pageSize, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (sortOrder != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("SortOrder")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(sortOrder, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Authorization missing or invalid", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The provided credentials are not authorized to access this resource", status_, responseText_, headers_, null); + } + else + if (status_ == 422) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Client Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 500) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Server Error", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get transaction fees + /// + /// + /// This endpoint returns a list of transaction fees + /// + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task Ede670103f9e3b509a817241a0821a38Async(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "transaction-fees" + urlBuilder_.Append("transaction-fees"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Authorization missing or invalid", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The provided credentials are not authorized to access this resource", status_, responseText_, headers_, null); + } + else + if (status_ == 500) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Server Error", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Search transactions + /// + /// + /// Search transactions with filters (date, invoice, fee type, etc.) + /// + /// [Optional] A pagination token used to jump to first, last, next or previous pages. When supplied, it overrides all other filter parameters. + /// Used to filter transactions based on search criteria. Required if cursor is not provided. Ignored when cursor is present (i.e., for paginated requests). + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task E3b509d887ccd0877c1cc2c393cb77a1Async(string cursor = null, TransactionRequestFilterV3 billing_TransactionRequestFilterV3 = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(billing_TransactionRequestFilterV3, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "transactions:query" + urlBuilder_.Append("transactions:query"); + urlBuilder_.Append('?'); + if (cursor != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("Cursor")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(cursor, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Authorization missing or invalid", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The provided credentials are not authorized to access this resource", status_, responseText_, headers_, null); + } + else + if (status_ == 500) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Server Error", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get transactions by invoiceid + /// + /// + /// The unique identifier of the invoice whose transactions are to be retrieved + /// + /// The unique identifier of the invoice whose transactions are to be retrieved Ex:-12345. + /// [Optional] A pagination token used to jump to first, last, next or previous pages. When supplied, it overrides all other filter parameters. + /// Number of transactions to return per page (default is 100, to be entered when API is called for first time). Must be between 1 and 1000. + /// Sort order of the results. Valid values: Ascending or Descending (default: Descending). + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _67caf0689d7942353fb639b3fb23dec0Async(string invoiceId, string cursor = null, double? pageSize = null, string sortOrder = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (invoiceId == null) + throw new System.ArgumentNullException("invoiceId"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "invoices/{invoiceId}/transactions" + urlBuilder_.Append("invoices/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(invoiceId, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/transactions"); + urlBuilder_.Append('?'); + if (cursor != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("Cursor")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(cursor, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (pageSize != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("PageSize")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(pageSize, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (sortOrder != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("SortOrder")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(sortOrder, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Authorization missing or invalid", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The provided credentials are not authorized to access this resource", status_, responseText_, headers_, null); + } + else + if (status_ == 404) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Not Found", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 500) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Server Error", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Cancel multiple Shipments by Shipment Id + /// + /// Channel ID for Operation + /// The shipment IDs to cancel + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task Fb3df1042240c1361e915d4211646c9eAsync(string shipbob_channel_id, CancelShipmentsModel orders_CancelShipmentsModel = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + + if (shipbob_channel_id == null) + throw new System.ArgumentNullException("shipbob_channel_id"); + request_.Headers.TryAddWithoutValidation("shipbob_channel_id", ConvertToString(shipbob_channel_id, System.Globalization.CultureInfo.InvariantCulture)); + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(orders_CancelShipmentsModel, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "shipment:batchCancel" + urlBuilder_.Append("shipment:batchCancel"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access right at this time", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access", status_, responseText_, headers_, null); + } + else + if (status_ == 422) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Client Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 500) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Server Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Update Tracking Uploaded Status for Multiple Shipments by Shipment Id + /// + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _690c5e9e61b830fb83df7cdfe849701eAsync(BulkUpdateTrackingUploadModel orders_BulkUpdateTrackingUploadModel = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(orders_BulkUpdateTrackingUploadModel, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "shipment:batchUpdateTrackingUpload" + urlBuilder_.Append("shipment:batchUpdateTrackingUpload"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access right at this time", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access", status_, responseText_, headers_, null); + } + else + if (status_ == 404) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Not Found", status_, responseText_, headers_, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get Order Store Json + /// + /// The order ID to Get the JSON Stored + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _414258524e39b947dc3c3a1cb1238444Async(string orderId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (orderId == null) + throw new System.ArgumentNullException("orderId"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "order/{orderId}/store-order-json" + urlBuilder_.Append("order/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(orderId, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/store-order-json"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 204) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No Content", status_, responseText_, headers_, null); + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access right at this time", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access", status_, responseText_, headers_, null); + } + else + if (status_ == 404) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Not Found", status_, responseText_, headers_, null); + } + else + if (status_ == 422) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Client Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Save the Store Order Json + /// + /// The order ID to Store + /// The JSON that represent the order on the Third Party Source + /// Created + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _34e752d61489858bcad405acd5192477Async(string orderId, AddStoreOrderJsonModel orders_AddStoreOrderJsonModel = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (orderId == null) + throw new System.ArgumentNullException("orderId"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(orders_AddStoreOrderJsonModel, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "order/{orderId}/store-order-json" + urlBuilder_.Append("order/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(orderId, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/store-order-json"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 201) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access right at this time", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access", status_, responseText_, headers_, null); + } + else + if (status_ == 404) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Not Found", status_, responseText_, headers_, null); + } + else + if (status_ == 422) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Client Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Cancel single Order by Order ID + /// + /// The order ID to cancel + /// Channel ID for Operation + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _81de608a90b49fefd21f436b25cabb9eAsync(string orderId, string shipbob_channel_id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (orderId == null) + throw new System.ArgumentNullException("orderId"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + + if (shipbob_channel_id == null) + throw new System.ArgumentNullException("shipbob_channel_id"); + request_.Headers.TryAddWithoutValidation("shipbob_channel_id", ConvertToString(shipbob_channel_id, System.Globalization.CultureInfo.InvariantCulture)); + request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "order/{orderId}:cancel" + urlBuilder_.Append("order/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(orderId, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append(":cancel"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access right at this time", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access", status_, responseText_, headers_, null); + } + else + if (status_ == 404) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Not Found", status_, responseText_, headers_, null); + } + else + if (status_ == 422) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Client Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 500) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Server Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Estimate Fulfillment Cost For Order + /// + /// + /// This endpoint will provide, where possible, an estimate of pricing and fulfillment center assignment of a potential standard (direct to consumer) order. Keep in mind that there are ways for the merchant to change FC assignment or product configuration after order creation that could invalidate this estimate. Estimates cannot be returned for items that are unknown, out of stock, or too large for fulfillment using standard box sizes. Additional services such as high-pick fees, shipping insurance, auto-splitting or auto-adding items to orders, and signature required are not included in this estimate. + /// + /// Channel Id for Operation + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task Ead592f20ff455d472d4e2f68613f881Async(string shipbob_channel_id, EstimateFulfillmentRequestModel orders_EstimateFulfillmentRequestModel = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + + if (shipbob_channel_id == null) + throw new System.ArgumentNullException("shipbob_channel_id"); + request_.Headers.TryAddWithoutValidation("shipbob_channel_id", ConvertToString(shipbob_channel_id, System.Globalization.CultureInfo.InvariantCulture)); + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(orders_EstimateFulfillmentRequestModel, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "order:estimate" + urlBuilder_.Append("order:estimate"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access right at this time", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access", status_, responseText_, headers_, null); + } + else + if (status_ == 422) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Client Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Cancel one Shipment by Order Id and Shipment Id + /// + /// The shipment id to get + /// Channel Id for Operation + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _390660c04540bd7106f681e71a45ad41Async(string shipmentId, string orderId, string shipbob_channel_id = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (shipmentId == null) + throw new System.ArgumentNullException("shipmentId"); + + if (orderId == null) + throw new System.ArgumentNullException("orderId"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + + if (shipbob_channel_id != null) + request_.Headers.TryAddWithoutValidation("shipbob_channel_id", ConvertToString(shipbob_channel_id, System.Globalization.CultureInfo.InvariantCulture)); + request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "order/{orderId}/shipment/{shipmentId}:cancel" + urlBuilder_.Append("order/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(orderId, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/shipment/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(shipmentId, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append(":cancel"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access right at this time", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access", status_, responseText_, headers_, null); + } + else + if (status_ == 404) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Not Found", status_, responseText_, headers_, null); + } + else + if (status_ == 422) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Client Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 500) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Server Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get shipping methods + /// + /// + /// Get all merchants shipping methods + /// + /// Page of orders to get + /// Amount of records per page to request + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> _18d1ac7f574de5301c160d7cd0e946a7Async(double? page = null, double? limit = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "shipping-method" + urlBuilder_.Append("shipping-method"); + urlBuilder_.Append('?'); + if (page != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("Page")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(page, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (limit != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("Limit")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(limit, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access right at this time", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access", status_, responseText_, headers_, null); + } + else + if (status_ == 422) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Client Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Cancel one Shipment by Shipment Id + /// + /// The shipment id to get + /// Channel Id for Operation + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task _6b9a94fb7e9f65e6d3599a4b1a4d3840Async(string shipmentId, string shipbob_channel_id = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (shipmentId == null) + throw new System.ArgumentNullException("shipmentId"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + + if (shipbob_channel_id != null) + request_.Headers.TryAddWithoutValidation("shipbob_channel_id", ConvertToString(shipbob_channel_id, System.Globalization.CultureInfo.InvariantCulture)); + request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "shipment/{shipmentId}:cancel" + urlBuilder_.Append("shipment/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(shipmentId, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append(":cancel"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + if (status_ == 400) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Bad Request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 401) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access right at this time", status_, responseText_, headers_, null); + } + else + if (status_ == 403) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("No access", status_, responseText_, headers_, null); + } + else + if (status_ == 404) + { + string responseText_ = ( response_.Content == null ) ? string.Empty : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("Not Found", status_, responseText_, headers_, null); + } + else + if (status_ == 422) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Client Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 500) + { + var objectResponse_ = await ReadObjectResponseAsync>>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException>>("Server Error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + { + var responseData_ = response_.Content == null ? null : await ReadAsStringAsync(response_.Content, cancellationToken).ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + protected struct ObjectResponseResult + { + public ObjectResponseResult(T responseObject, string responseText) + { + this.Object = responseObject; + this.Text = responseText; + } + + public T Object { get; } + + public string Text { get; } + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + private static System.Threading.Tasks.Task ReadAsStringAsync(System.Net.Http.HttpContent content, System.Threading.CancellationToken cancellationToken) + { + #if NET5_0_OR_GREATER + return content.ReadAsStringAsync(cancellationToken); + #else + return content.ReadAsStringAsync(); + #endif + } + + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] + private static System.Threading.Tasks.Task ReadAsStreamAsync(System.Net.Http.HttpContent content, System.Threading.CancellationToken cancellationToken) + { + #if NET5_0_OR_GREATER + return content.ReadAsStreamAsync(cancellationToken); + #else + return content.ReadAsStreamAsync(); + #endif + } + + public bool ReadResponseAsString { get; set; } + + protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) + { + if (response == null || response.Content == null) + { + return new ObjectResponseResult(default(T), string.Empty); + } + + if (ReadResponseAsString) + { + var responseText = await ReadAsStringAsync(response.Content, cancellationToken).ConfigureAwait(false); + try + { + var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); + return new ObjectResponseResult(typedBody, responseText); + } + catch (Newtonsoft.Json.JsonException exception) + { + var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; + throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); + } + } + else + { + try + { + using (var responseStream = await ReadAsStreamAsync(response.Content, cancellationToken).ConfigureAwait(false)) + using (var streamReader = new System.IO.StreamReader(responseStream)) + using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) + { + var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); + var typedBody = serializer.Deserialize(jsonTextReader); + return new ObjectResponseResult(typedBody, string.Empty); + } + } + catch (Newtonsoft.Json.JsonException exception) + { + var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; + throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); + } + } + } + + private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) + { + if (value == null) + { + return ""; + } + + if (value is System.Enum) + { + var name = System.Enum.GetName(value.GetType(), value); + if (name != null) + { + var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); + if (field != null) + { + var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) + as System.Runtime.Serialization.EnumMemberAttribute; + if (attribute != null) + { + return attribute.Value != null ? attribute.Value : name; + } + } + + var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); + return converted == null ? string.Empty : converted; + } + } + else if (value is bool) + { + return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); + } + else if (value is byte[]) + { + return System.Convert.ToBase64String((byte[]) value); + } + else if (value is string[]) + { + return string.Join(",", (string[])value); + } + else if (value.GetType().IsArray) + { + var valueArray = (System.Array)value; + var valueTextArray = new string[valueArray.Length]; + for (var i = 0; i < valueArray.Length; i++) + { + valueTextArray[i] = ConvertToString(valueArray.GetValue(i), cultureInfo); + } + return string.Join(",", valueTextArray); + } + + var result = System.Convert.ToString(value, cultureInfo); + return result == null ? "" : result; + } + } + + public partial class StringArray : System.Collections.ObjectModel.Collection + { + + } + + /// + /// Data transfer object representing an invoice. + /// + public partial class InvoiceDto + { + + /// + /// The total invoice amount. + /// + [Newtonsoft.Json.JsonProperty("amount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Amount { get; set; } + + /// + /// The ISO currency code used in the invoice (e.g., USD, EUR). + /// + [Newtonsoft.Json.JsonProperty("currencyCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string CurrencyCode { get; set; } + + /// + /// The invoice date in yyyy-mm-dd format. + /// + [Newtonsoft.Json.JsonProperty("invoiceDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string InvoiceDate { get; set; } + + /// + /// Unique identifier for the invoice. + /// + [Newtonsoft.Json.JsonProperty("invoiceId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int InvoiceId { get; set; } + + /// + /// The type or category of the invoice. Available options: + ///
- Shipping + ///
- Inbound Fee + ///
- WarehouseStorage + ///
- AdditionalFee + ///
- Return + ///
- Credits + ///
- BalanceAdjustment + ///
- Payment + ///
+ [Newtonsoft.Json.JsonProperty("invoiceType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string InvoiceType { get; set; } + + /// + /// The running balance of the account after this invoice is applied. + /// + [Newtonsoft.Json.JsonProperty("runningBalance", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double RunningBalance { get; set; } + + } + + public partial class InvoiceDtoCursorPagedResponse + { + + /// + /// Go to the first page + /// + [Newtonsoft.Json.JsonProperty("first", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string First { get; set; } + + [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Items { get; set; } + + /// + /// Go to the Last page + /// + [Newtonsoft.Json.JsonProperty("last", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Last { get; set; } + + /// + /// Go to the Next page + /// + [Newtonsoft.Json.JsonProperty("next", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Next { get; set; } + + /// + /// Go to the Previous page + /// + [Newtonsoft.Json.JsonProperty("prev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Prev { get; set; } + + } + + public partial class InvoiceDtoCursorPagedResponseV3 + { + + /// + /// Go to the first page + /// + [Newtonsoft.Json.JsonProperty("first", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string First { get; set; } + + [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Items { get; set; } + + /// + /// Go to the Last page + /// + [Newtonsoft.Json.JsonProperty("last", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Last { get; set; } + + /// + /// Go to the Next page + /// + [Newtonsoft.Json.JsonProperty("next", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Next { get; set; } + + /// + /// Go to the Previous page + /// + [Newtonsoft.Json.JsonProperty("prev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Prev { get; set; } + + } + + /// + /// Data transfer object representing an invoice. + /// + public partial class InvoiceDtoV3 + { + + /// + /// The total invoice amount. + /// + [Newtonsoft.Json.JsonProperty("amount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Amount { get; set; } + + /// + /// The ISO currency code used in the invoice (e.g., USD, EUR). + /// + [Newtonsoft.Json.JsonProperty("currency_code", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Currency_code { get; set; } + + /// + /// The invoice date in yyyy-mm-dd format. + /// + [Newtonsoft.Json.JsonProperty("invoice_date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Invoice_date { get; set; } + + /// + /// Unique identifier for the invoice. + /// + [Newtonsoft.Json.JsonProperty("invoice_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Invoice_id { get; set; } + + /// + /// The type or category of the invoice. Available options: + ///
- Shipping + ///
- Inbound Fee + ///
- WarehouseStorage + ///
- AdditionalFee + ///
- Return + ///
- Credits + ///
- BalanceAdjustment + ///
- Payment + ///
+ [Newtonsoft.Json.JsonProperty("invoice_type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Invoice_type { get; set; } + + /// + /// The running balance of the account after this invoice is applied. + /// + [Newtonsoft.Json.JsonProperty("running_balance", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Running_balance { get; set; } + + } + + public partial class InvoiceTaxDto + { + + /// + /// Tax amount charged for the tax type. + /// + [Newtonsoft.Json.JsonProperty("taxAmount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double TaxAmount { get; set; } + + /// + /// Rate of Tax charged for the tax type + /// + [Newtonsoft.Json.JsonProperty("taxRate", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double TaxRate { get; set; } + + /// + /// Type of tax charged for eg. GST + /// + [Newtonsoft.Json.JsonProperty("taxType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string TaxType { get; set; } + + } + + public partial class InvoiceTaxDtoV3 + { + + /// + /// Tax amount charged for the tax type. + /// + [Newtonsoft.Json.JsonProperty("tax_amount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Tax_amount { get; set; } + + /// + /// Rate of Tax charged for the tax type + /// + [Newtonsoft.Json.JsonProperty("tax_rate", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Tax_rate { get; set; } + + /// + /// Type of tax charged for eg. GST + /// + [Newtonsoft.Json.JsonProperty("tax_type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Tax_type { get; set; } + + } + + public partial class ProblemDetails + { + + [Newtonsoft.Json.JsonProperty("detail", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Detail { get; set; } + + [Newtonsoft.Json.JsonProperty("instance", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Instance { get; set; } + + [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Status { get; set; } + + [Newtonsoft.Json.JsonProperty("title", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Title { get; set; } + + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Type { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public enum SortOrder + { + + [System.Runtime.Serialization.EnumMember(Value = @"Ascending")] + Ascending = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"Descending")] + Descending = 1, + + } + + /// + /// Represents a transaction data object. + /// + public partial class TransactionDto + { + + /// + /// Any additional details related to the transaction in a key-value pair format. + /// + [Newtonsoft.Json.JsonProperty("additionalDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.IDictionary AdditionalDetails { get; set; } + + /// + /// Charge Amount for the transaction + /// + [Newtonsoft.Json.JsonProperty("amount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? Amount { get; set; } + + /// + /// The Charge date of transaction + /// + [Newtonsoft.Json.JsonProperty("chargeDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ChargeDate { get; set; } + + /// + /// The ISO currency code (e.g., USD, EUR) for the transaction. + /// + [Newtonsoft.Json.JsonProperty("currencyCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string CurrencyCode { get; set; } + + /// + /// The name or code of the fulfillment center involved in the transaction. + /// + [Newtonsoft.Json.JsonProperty("fulfillmentCenter", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string FulfillmentCenter { get; set; } + + /// + /// The date the invoice was generated. + /// + [Newtonsoft.Json.JsonProperty("invoiceDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string InvoiceDate { get; set; } + + /// + /// The unique identifier of the related invoice. + /// + [Newtonsoft.Json.JsonProperty("invoiceId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? InvoiceId { get; set; } + + /// + /// The type or category of the invoice. Available options: + ///
- Shipping + ///
- Inbound Fee + ///
- WarehouseStorage + ///
- AdditionalFee + ///
- Return + ///
- Credits + ///
- BalanceAdjustment + ///
- Payment + ///
+ [Newtonsoft.Json.JsonProperty("invoiceType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string InvoiceType { get; set; } + + [Newtonsoft.Json.JsonProperty("invoicedStatus", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? InvoicedStatus { get; set; } + + /// + /// A unique reference identifier associated with the transaction. + /// + [Newtonsoft.Json.JsonProperty("referenceId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ReferenceId { get; set; } + + /// + /// The type of reference associated with the ReferenceId. Available options: + ///
- Shipment + ///
- Return + ///
- WRO + ///
- URO + ///
- Ticket Number + ///
- FC + ///
- LPN Reference + ///
- Transfer Plan + ///
+ [Newtonsoft.Json.JsonProperty("referenceType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ReferenceType { get; set; } + + /// + /// A list of tax details applied to the transaction if exists. + /// + [Newtonsoft.Json.JsonProperty("taxes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Taxes { get; set; } + + /// + /// The fee type associated with the transaction for eg. Shipping fees + ///
To get all the available transaction fees use the endpoint - '/transaction-fees' + ///
+ [Newtonsoft.Json.JsonProperty("transactionFee", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string TransactionFee { get; set; } + + /// + /// The classification or nature of the transaction + ///
Transaction Types - Charge, Refund, Credit, Payment, BalanceAdjustment + ///
+ [Newtonsoft.Json.JsonProperty("transactionType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string TransactionType { get; set; } + + } + + public partial class TransactionDtoCursorPagedResponse + { + + /// + /// Go to the first page + /// + [Newtonsoft.Json.JsonProperty("first", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string First { get; set; } + + [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Items { get; set; } + + /// + /// Go to the Last page + /// + [Newtonsoft.Json.JsonProperty("last", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Last { get; set; } + + /// + /// Go to the Next page + /// + [Newtonsoft.Json.JsonProperty("next", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Next { get; set; } + + /// + /// Go to the Previous page + /// + [Newtonsoft.Json.JsonProperty("prev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Prev { get; set; } + + } + + public partial class TransactionDtoCursorPagedResponseV3 + { + + /// + /// Go to the first page + /// + [Newtonsoft.Json.JsonProperty("first", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string First { get; set; } + + [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Items { get; set; } + + /// + /// Go to the Last page + /// + [Newtonsoft.Json.JsonProperty("last", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Last { get; set; } + + /// + /// Go to the Next page + /// + [Newtonsoft.Json.JsonProperty("next", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Next { get; set; } + + /// + /// Go to the Previous page + /// + [Newtonsoft.Json.JsonProperty("prev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Prev { get; set; } + + } + + /// + /// Represents a transaction data object. + /// + public partial class TransactionDtoV3 + { + + /// + /// Any additional details related to the transaction in a key-value pair format. + /// + [Newtonsoft.Json.JsonProperty("additional_details", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.IDictionary Additional_details { get; set; } + + /// + /// Charge Amount for the transaction + /// + [Newtonsoft.Json.JsonProperty("amount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? Amount { get; set; } + + /// + /// The Charge date of transaction + /// + [Newtonsoft.Json.JsonProperty("charge_date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Charge_date { get; set; } + + /// + /// The ISO currency code (e.g., USD, EUR) for the transaction. + /// + [Newtonsoft.Json.JsonProperty("currency_code", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Currency_code { get; set; } + + /// + /// The name or code of the fulfillment center involved in the transaction. + /// + [Newtonsoft.Json.JsonProperty("fulfillment_center", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Fulfillment_center { get; set; } + + /// + /// The date the invoice was generated. + /// + [Newtonsoft.Json.JsonProperty("invoice_date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Invoice_date { get; set; } + + /// + /// The unique identifier of the related invoice. + /// + [Newtonsoft.Json.JsonProperty("invoice_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Invoice_id { get; set; } + + /// + /// The type or category of the invoice. Available options: + ///
- Shipping + ///
- Inbound Fee + ///
- WarehouseStorage + ///
- AdditionalFee + ///
- Return + ///
- Credits + ///
- BalanceAdjustment + ///
- Payment + ///
+ [Newtonsoft.Json.JsonProperty("invoice_type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Invoice_type { get; set; } + + [Newtonsoft.Json.JsonProperty("invoiced_status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? Invoiced_status { get; set; } + + /// + /// A unique reference identifier associated with the transaction. + /// + [Newtonsoft.Json.JsonProperty("reference_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reference_id { get; set; } + + /// + /// The type of reference associated with the ReferenceId. Available options: + ///
- Shipment + ///
- Return + ///
- WRO + ///
- URO + ///
- Ticket Number + ///
- FC + ///
- LPN Reference + ///
- Transfer Plan + ///
+ [Newtonsoft.Json.JsonProperty("reference_type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reference_type { get; set; } + + /// + /// A list of tax details applied to the transaction if exists. + /// + [Newtonsoft.Json.JsonProperty("taxes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Taxes { get; set; } + + /// + /// The fee type associated with the transaction for eg. Shipping fees + ///
To get all the available transaction fees use the endpoint - '/transaction-fees' + ///
+ [Newtonsoft.Json.JsonProperty("transaction_fee", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Transaction_fee { get; set; } + + /// + /// The classification or nature of the transaction + ///
Transaction Types - Charge, Refund, Credit, Payment, BalanceAdjustment + ///
+ [Newtonsoft.Json.JsonProperty("transaction_type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Transaction_type { get; set; } + + } + + public partial class TransactionFeeModelV2 + { + + [Newtonsoft.Json.JsonProperty("feeList", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection FeeList { get; set; } + + } + + public partial class TransactionFeeModelV3 + { + + [Newtonsoft.Json.JsonProperty("fee_list", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Fee_list { get; set; } + + } + + public partial class TransactionRequestFilterV3 + { + + /// + /// Start date for filtering transactions by transaction charge date. + /// + [Newtonsoft.Json.JsonProperty("from_date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? From_date { get; set; } + + /// + /// List of invoice IDs to filter transactions + /// + [Newtonsoft.Json.JsonProperty("invoice_ids", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Invoice_ids { get; set; } + + /// + /// Filter Transactions by invoicing status: + ///
- True(Billed Transactions) + ///
- False(Unbilled Transactions) + ///
- null (Billed + Unbilled Transactions) + ///
+ [Newtonsoft.Json.JsonProperty("invoiced_status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? Invoiced_status { get; set; } + + /// + /// Number of transactions to return per page (default is 100, to be entered when API is called for first time). Must be between 1 and 1000. + /// + [Newtonsoft.Json.JsonProperty("page_size", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Page_size { get; set; } + + /// + /// List of reference IDs (like Shipment ID, WRO id) to filter transactions (can be numeric or string identifiers). + /// + [Newtonsoft.Json.JsonProperty("reference_ids", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Reference_ids { get; set; } + + /// + /// The type of reference associated with the ReferenceId. Available options: + ///
- Shipment + ///
- Return + ///
- WRO + ///
- URO + ///
+ [Newtonsoft.Json.JsonProperty("reference_types", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Reference_types { get; set; } + + [Newtonsoft.Json.JsonProperty("sort_order", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public SortOrder Sort_order { get; set; } + + /// + /// End date for filtering transactions by transaction charge date. + /// + [Newtonsoft.Json.JsonProperty("to_date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? To_date { get; set; } + + /// + /// <p>To get all the available transaction fees use this endpoint:- '/transaction-fees'</p> + /// + [Newtonsoft.Json.JsonProperty("transaction_fees", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Transaction_fees { get; set; } + + /// + /// The classification or nature of the transaction + ///
Transaction Types - Charge, Refund, Credit, Payment, BalanceAdjustment + ///
+ [Newtonsoft.Json.JsonProperty("transaction_types", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Transaction_types { get; set; } + + } + + public partial class ChannelViewModel + { + + /// + /// Name of the application that owns the channel + /// + [Newtonsoft.Json.JsonProperty("application_name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Application_name { get; set; } + + /// + /// Unique id of the channel + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Id { get; set; } + + /// + /// Name of the channel + /// + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// Array of permissions granted for the channel + /// + [Newtonsoft.Json.JsonProperty("scopes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Scopes { get; set; } + + } + + /// + /// Get Channels response + /// + public partial class ChannelsV2ViewModel + { + + /// + /// List of channels + /// + [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Items { get; set; } + + /// + /// Next page url + /// + [Newtonsoft.Json.JsonProperty("next", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Next { get; set; } + + /// + /// Previous page url + /// + [Newtonsoft.Json.JsonProperty("prev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Prev { get; set; } + + } + + /// + /// Model for create channel request + /// + public partial class CreateChannelRequestModel + { + + /// + /// Name of the channel + /// + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public string Name { get; set; } + + } + + public partial class ErrorResponse : System.Collections.Generic.Dictionary> + { + + } + + public partial class DimensionsResponse + { + + [Newtonsoft.Json.JsonProperty("height", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Height { get; set; } + + [Newtonsoft.Json.JsonProperty("is_locked", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_locked { get; set; } + + [Newtonsoft.Json.JsonProperty("length", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Length { get; set; } + + [Newtonsoft.Json.JsonProperty("unit", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Unit { get; set; } + + [Newtonsoft.Json.JsonProperty("validated", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Validated { get; set; } + + [Newtonsoft.Json.JsonProperty("width", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Width { get; set; } + + } + + public partial class FilterOperation + { + + [Newtonsoft.Json.JsonProperty("key", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Key { get; set; } + + [Newtonsoft.Json.JsonProperty("rawValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string RawValue { get; set; } + + } + + public partial class FilterOperationArray : System.Collections.ObjectModel.Collection + { + + } + + public partial class FulfillableQuantityByFulfillmentCenter + { + + [Newtonsoft.Json.JsonProperty("awaiting_quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Awaiting_quantity { get; set; } + + [Newtonsoft.Json.JsonProperty("committed_quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Committed_quantity { get; set; } + + [Newtonsoft.Json.JsonProperty("fulfillable_quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Fulfillable_quantity { get; set; } + + [Newtonsoft.Json.JsonProperty("internal_transfer_quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Internal_transfer_quantity { get; set; } + + [Newtonsoft.Json.JsonProperty("location_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Location_id { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("on_hand_quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int On_hand_quantity { get; set; } + + } + + public partial class FulfillmentCenterResponse + { + + [Newtonsoft.Json.JsonProperty("awaiting_quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Awaiting_quantity { get; set; } + + [Newtonsoft.Json.JsonProperty("committed_quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Committed_quantity { get; set; } + + [Newtonsoft.Json.JsonProperty("fulfillable_quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Fulfillable_quantity { get; set; } + + [Newtonsoft.Json.JsonProperty("internal_transfer_quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Internal_transfer_quantity { get; set; } + + [Newtonsoft.Json.JsonProperty("location_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Location_id { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("on_hand_quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int On_hand_quantity { get; set; } + + } + + public partial class IntegerArray : System.Collections.ObjectModel.Collection + { + + } + + public partial class IntegerArray2 : System.Collections.ObjectModel.Collection + { + + } + + public partial class IntegerArray3 : System.Collections.ObjectModel.Collection + { + + } + + public partial class IntegerArray4 : System.Collections.ObjectModel.Collection + { + + } + + public partial class HazmatResponse + { + + [Newtonsoft.Json.JsonProperty("is_hazmat", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_hazmat { get; set; } + + [Newtonsoft.Json.JsonProperty("validated", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Validated { get; set; } + + } + + public partial class InventoryQuantityFcResponse + { + + [Newtonsoft.Json.JsonProperty("inventory_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Inventory_id { get; set; } + + [Newtonsoft.Json.JsonProperty("locations", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Locations { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("sku", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Sku { get; set; } + + } + + public partial class InventoryQuantityFcResponsePagedResponse + { + + [Newtonsoft.Json.JsonProperty("first", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string First { get; set; } + + [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Items { get; set; } + + [Newtonsoft.Json.JsonProperty("last", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Last { get; set; } + + [Newtonsoft.Json.JsonProperty("next", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Next { get; set; } + + [Newtonsoft.Json.JsonProperty("prev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Prev { get; set; } + + } + + public partial class InventoryQuantityLotResponse + { + + [Newtonsoft.Json.JsonProperty("inventory_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Inventory_id { get; set; } + + [Newtonsoft.Json.JsonProperty("lots", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Lots { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("sku", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Sku { get; set; } + + } + + public partial class InventoryQuantityLotResponsePagedResponse + { + + [Newtonsoft.Json.JsonProperty("first", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string First { get; set; } + + [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Items { get; set; } + + [Newtonsoft.Json.JsonProperty("last", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Last { get; set; } + + [Newtonsoft.Json.JsonProperty("next", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Next { get; set; } + + [Newtonsoft.Json.JsonProperty("prev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Prev { get; set; } + + } + + public partial class InventoryQuantityResponse + { + + [Newtonsoft.Json.JsonProperty("inventory_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Inventory_id { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("sku", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Sku { get; set; } + + [Newtonsoft.Json.JsonProperty("total_awaiting_quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Total_awaiting_quantity { get; set; } + + [Newtonsoft.Json.JsonProperty("total_backordered_quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Total_backordered_quantity { get; set; } + + [Newtonsoft.Json.JsonProperty("total_committed_quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Total_committed_quantity { get; set; } + + [Newtonsoft.Json.JsonProperty("total_exception_quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Total_exception_quantity { get; set; } + + [Newtonsoft.Json.JsonProperty("total_fulfillable_quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Total_fulfillable_quantity { get; set; } + + [Newtonsoft.Json.JsonProperty("total_internal_transfer_quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Total_internal_transfer_quantity { get; set; } + + [Newtonsoft.Json.JsonProperty("total_on_hand_quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Total_on_hand_quantity { get; set; } + + [Newtonsoft.Json.JsonProperty("total_sellable_quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Total_sellable_quantity { get; set; } + + } + + public partial class InventoryQuantityResponsePagedResponse + { + + [Newtonsoft.Json.JsonProperty("first", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string First { get; set; } + + [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Items { get; set; } + + [Newtonsoft.Json.JsonProperty("last", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Last { get; set; } + + [Newtonsoft.Json.JsonProperty("next", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Next { get; set; } + + [Newtonsoft.Json.JsonProperty("prev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Prev { get; set; } + + } + + public partial class InventoryResponse + { + + [Newtonsoft.Json.JsonProperty("barcode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Barcode { get; set; } + + [Newtonsoft.Json.JsonProperty("dimensions", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public DimensionsResponse Dimensions { get; set; } + + [Newtonsoft.Json.JsonProperty("inventory_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Inventory_id { get; set; } + + [Newtonsoft.Json.JsonProperty("is_case", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_case { get; set; } + + [Newtonsoft.Json.JsonProperty("is_lot", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_lot { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("sku", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Sku { get; set; } + + [Newtonsoft.Json.JsonProperty("user_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int User_id { get; set; } + + [Newtonsoft.Json.JsonProperty("variant", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public VariantResponse Variant { get; set; } + + [Newtonsoft.Json.JsonProperty("weight", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public WeightResponse Weight { get; set; } + + } + + public partial class InventoryResponsePagedResponse + { + + [Newtonsoft.Json.JsonProperty("first", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string First { get; set; } + + [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Items { get; set; } + + [Newtonsoft.Json.JsonProperty("last", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Last { get; set; } + + [Newtonsoft.Json.JsonProperty("next", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Next { get; set; } + + [Newtonsoft.Json.JsonProperty("prev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Prev { get; set; } + + } + + public partial class Lots + { + + [Newtonsoft.Json.JsonProperty("awaiting_quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Awaiting_quantity { get; set; } + + [Newtonsoft.Json.JsonProperty("committed_quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Committed_quantity { get; set; } + + [Newtonsoft.Json.JsonProperty("fulfillable_quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Fulfillable_quantity { get; set; } + + [Newtonsoft.Json.JsonProperty("internal_transfer_quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Internal_transfer_quantity { get; set; } + + [Newtonsoft.Json.JsonProperty("locations", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Locations { get; set; } + + [Newtonsoft.Json.JsonProperty("lot_date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Lot_date { get; set; } + + [Newtonsoft.Json.JsonProperty("lot_number", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Lot_number { get; set; } + + [Newtonsoft.Json.JsonProperty("on_hand_quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int On_hand_quantity { get; set; } + + } + + public partial class ProblemDetails2 + { + + [Newtonsoft.Json.JsonProperty("detail", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Detail { get; set; } + + [Newtonsoft.Json.JsonProperty("instance", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Instance { get; set; } + + [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Status { get; set; } + + [Newtonsoft.Json.JsonProperty("title", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Title { get; set; } + + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Type { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class VariantResponse + { + + [Newtonsoft.Json.JsonProperty("hazmat", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public HazmatResponse Hazmat { get; set; } + + [Newtonsoft.Json.JsonProperty("is_active", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_active { get; set; } + + [Newtonsoft.Json.JsonProperty("is_bundle", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_bundle { get; set; } + + [Newtonsoft.Json.JsonProperty("is_digital", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_digital { get; set; } + + } + + public partial class WeightResponse + { + + [Newtonsoft.Json.JsonProperty("unit", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Unit { get; set; } + + [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Value { get; set; } + + } + + /// + /// The service-specific address of the location. Each object contains address type, address1, address2, city, state, country, zip code, phone number, and email + /// + public partial class AddressViewModel + { + + /// + /// First part of the address of the location for this service + /// + [Newtonsoft.Json.JsonProperty("address1", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Address1 { get; set; } + + /// + /// Second part of the address of the location for this service + /// + [Newtonsoft.Json.JsonProperty("address2", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Address2 { get; set; } + + /// + /// City of the location + /// + [Newtonsoft.Json.JsonProperty("city", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string City { get; set; } + + /// + /// Country of the location + /// + [Newtonsoft.Json.JsonProperty("country", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Country { get; set; } + + /// + /// Email of the location for this service + /// + [Newtonsoft.Json.JsonProperty("email", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Email { get; set; } + + /// + /// Name to use in the address of the location for this service + /// + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// Phone Number of the location for this service + /// + [Newtonsoft.Json.JsonProperty("phone_number", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Phone_number { get; set; } + + /// + /// State of the location + /// + [Newtonsoft.Json.JsonProperty("state", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string State { get; set; } + + /// + /// Zip code of the location + /// + [Newtonsoft.Json.JsonProperty("zip_code", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Zip_code { get; set; } + + } + + public partial class FcAttributeViewModel + { + + /// + /// Unique Id for the fulfillment center attribute + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Id { get; set; } + + /// + /// Name of the attribute. + /// + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + } + + public partial class FcTypeViewModel + { + + /// + /// Unique Id for the fulfillment center type + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Id { get; set; } + + /// + /// Name of the fc type + /// + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + } + + public partial class FcTypeViewModelV2 : FcTypeViewModel + { + + [Newtonsoft.Json.JsonProperty("organization_roles", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Organization_roles { get; set; } + + [Newtonsoft.Json.JsonProperty("organization_type_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Guid Organization_type_id { get; set; } + + [Newtonsoft.Json.JsonProperty("organization_type_name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Organization_type_name { get; set; } + + } + + public partial class FulfillmentCenterNameViewModel + { + + /// + /// Unique Id for the fulfillment center + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Id { get; set; } + + /// + /// Name for the fulfillment center + /// + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + } + + public partial class FulfillmentCenterRegionViewModel + { + + /// + /// Unique Id for the location region + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Id { get; set; } + + /// + /// Name of the region the location is in. + /// + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + } + + public partial class OneOfArray : System.Collections.ObjectModel.Collection + { + + } + + public partial class InternalLocationViewModel : LocationViewModel + { + + [Newtonsoft.Json.JsonProperty("fulfillment_center_attributes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Fulfillment_center_attributes { get; set; } + + [Newtonsoft.Json.JsonProperty("fulfillment_center_type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public FcTypeViewModel Fulfillment_center_type { get; set; } + + [Newtonsoft.Json.JsonProperty("is_enabled_for_new_user", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_enabled_for_new_user { get; set; } + + [Newtonsoft.Json.JsonProperty("is_external", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_external { get; set; } + + } + + public partial class InternalLocationViewModelV2 : LocationViewModelV2 + { + + [Newtonsoft.Json.JsonProperty("fulfillment_center_attributes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Fulfillment_center_attributes { get; set; } + + [Newtonsoft.Json.JsonProperty("fulfillment_center_type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public FcTypeViewModel Fulfillment_center_type { get; set; } + + [Newtonsoft.Json.JsonProperty("is_enabled_for_new_user", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_enabled_for_new_user { get; set; } + + [Newtonsoft.Json.JsonProperty("max_sku_allowed", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Max_sku_allowed { get; set; } + + [Newtonsoft.Json.JsonProperty("receiving_hub", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public FulfillmentCenterNameViewModel Receiving_hub { get; set; } + + [Newtonsoft.Json.JsonProperty("sort_center", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public FulfillmentCenterNameViewModel Sort_center { get; set; } + + } + + public partial class LocationViewModel + { + + /// + /// Abbreviation of the location. Combination of nearest Airport Code and the sequence number. + /// + [Newtonsoft.Json.JsonProperty("abbreviation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Abbreviation { get; set; } + + /// + /// Indicates whether or not the user is authorized to interact at all with the location + /// + [Newtonsoft.Json.JsonProperty("access_granted", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Access_granted { get; set; } + + /// + /// Available attributes for the location + /// + [Newtonsoft.Json.JsonProperty("attributes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Attributes { get; set; } + + /// + /// Id of the location in ShipBob’s database + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Id { get; set; } + + /// + /// Indicates if the location is operationally active or inactive + /// + [Newtonsoft.Json.JsonProperty("is_active", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_active { get; set; } + + /// + /// Indicates if the receiving is enabled for FC + /// + [Newtonsoft.Json.JsonProperty("is_receiving_enabled", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_receiving_enabled { get; set; } + + /// + /// Indicates if the shipping is enabled for FC + /// + [Newtonsoft.Json.JsonProperty("is_shipping_enabled", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_shipping_enabled { get; set; } + + /// + /// Name of the location. Follows the naming convention City (State Code) + ///
for domestic FCs and City (Country Code) for international FCs + ///
+ [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("region", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public FulfillmentCenterRegionViewModel Region { get; set; } + + /// + /// Services provided by the location + /// + [Newtonsoft.Json.JsonProperty("services", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Services { get; set; } + + /// + /// Time zone of the location + /// + [Newtonsoft.Json.JsonProperty("timezone", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Timezone { get; set; } + + } + + public partial class LocationViewModelV2 : LocationViewModel + { + + [Newtonsoft.Json.JsonProperty("organization_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Guid Organization_id { get; set; } + + [Newtonsoft.Json.JsonProperty("owner_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Guid? Owner_id { get; set; } + + [Newtonsoft.Json.JsonProperty("parent_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Guid? Parent_id { get; set; } + + } + + public partial class OrganizationRoleViewModel + { + + [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Description { get; set; } + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Guid Id { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + } + + public enum ServiceTypeEnum + { + + [System.Runtime.Serialization.EnumMember(Value = @"Receiving")] + Receiving = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"Returns")] + Returns = 1, + + } + + public partial class ServiceViewModel + { + + [Newtonsoft.Json.JsonProperty("address", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public AddressViewModel Address { get; set; } + + /// + /// Indicates if the user is authorized to access this service at the location + /// + [Newtonsoft.Json.JsonProperty("enabled", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Enabled { get; set; } + + [Newtonsoft.Json.JsonProperty("service_type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public ServiceTypeEnum Service_type { get; set; } + + } + + public partial class AddProductToOrderByProductIdModel : AddProductToOrderModel + { + + /// + /// Numeric assignment per item. Used as a reference number for multiple purposes such as split orders, split containers, etc. + /// + [Newtonsoft.Json.JsonProperty("external_line_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? External_line_id { get; set; } + + /// + /// Unique id of the product + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Id { get; set; } + + /// + /// The quantity of this product ordered + /// + [Newtonsoft.Json.JsonProperty("quantity", Required = Newtonsoft.Json.Required.Always)] + public int Quantity { get; set; } + + /// + /// Defined standard for measure for an item (each, inner pack, case, pallet). Values: EA, INP, CS and PL + /// + [Newtonsoft.Json.JsonProperty("quantity_unit_of_measure_code", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Quantity_unit_of_measure_code { get; set; } + + } + + public partial class AddProductToOrderByReferenceIdModel : AddProductToOrderModel + { + + /// + /// Numeric assignment per item. Used as a reference number for multiple purposes such as split orders, split containers, etc. + /// + [Newtonsoft.Json.JsonProperty("external_line_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? External_line_id { get; set; } + + /// + /// Global Trade Item Number - unique and internationally recognized identifier assigned to item by company GS1 + /// + [Newtonsoft.Json.JsonProperty("gtin", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(50)] + public string Gtin { get; set; } + + /// + /// Name of the product. Required if there is not an existing ShipBob product with a matching reference_id value. + /// + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// The quantity of this product ordered + /// + [Newtonsoft.Json.JsonProperty("quantity", Required = Newtonsoft.Json.Required.Always)] + public int Quantity { get; set; } + + /// + /// Defined standard for measure for an item (each, inner pack, case, pallet). Values: EA, INP, CS and PL + /// + [Newtonsoft.Json.JsonProperty("quantity_unit_of_measure_code", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Quantity_unit_of_measure_code { get; set; } + + /// + /// Unique reference id of the product + /// + [Newtonsoft.Json.JsonProperty("reference_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(int.MaxValue, MinimumLength = 1)] + public string Reference_id { get; set; } + + /// + /// Product SKU + /// + [Newtonsoft.Json.JsonProperty("sku", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Sku { get; set; } + + /// + /// Price for one item + /// + [Newtonsoft.Json.JsonProperty("unit_price", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? Unit_price { get; set; } + + /// + /// Universal Product Code - Unique external identifier + /// + [Newtonsoft.Json.JsonProperty("upc", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(50)] + public string Upc { get; set; } + + } + + public partial class AddProductToOrderModel + { + + /// + /// Numeric assignment per item. Used as a reference number for multiple purposes such as split orders, split containers, etc. + /// + [Newtonsoft.Json.JsonProperty("external_line_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? External_line_id { get; set; } + + [Newtonsoft.Json.JsonProperty("quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.Range(1, 2147483647)] + public int Quantity { get; set; } + + /// + /// Defined standard for measure for an item (each, inner pack, case, pallet). Values: EA, INP, CS and PL + /// + [Newtonsoft.Json.JsonProperty("quantity_unit_of_measure_code", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Quantity_unit_of_measure_code { get; set; } + + } + + /// + /// Model for adding a Store Order Json to a ShipBob Order. + /// + public partial class AddStoreOrderJsonModel + { + + /// + /// Json String that represent the order on a store front system + /// + [Newtonsoft.Json.JsonProperty("order_json", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(int.MaxValue, MinimumLength = 1)] + public string Order_json { get; set; } + + } + + public enum AddressType + { + + [System.Runtime.Serialization.EnumMember(Value = @"MarkFor")] + MarkFor = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"ShipFrom")] + ShipFrom = 1, + + } + + public partial class AddressViewModel2 + { + + /// + /// First line of the address + /// + [Newtonsoft.Json.JsonProperty("address1", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public string Address1 { get; set; } + + /// + /// Second line of the address + /// + [Newtonsoft.Json.JsonProperty("address2", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Address2 { get; set; } + + /// + /// The city + /// + [Newtonsoft.Json.JsonProperty("city", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public string City { get; set; } + + /// + /// Name of the company receiving the shipment + /// + [Newtonsoft.Json.JsonProperty("company_name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Company_name { get; set; } + + /// + /// The country (Must be ISO Alpha-2 for estimates) + /// + [Newtonsoft.Json.JsonProperty("country", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public string Country { get; set; } + + /// + /// The state or province + /// + [Newtonsoft.Json.JsonProperty("state", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string State { get; set; } + + /// + /// The zip code or postal code + /// + [Newtonsoft.Json.JsonProperty("zip_code", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Zip_code { get; set; } + + } + + public partial class BulkUpdateResponseError + { + + [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Code { get; set; } + + [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Message { get; set; } + + } + + public partial class BulkUpdateResponseModel + { + + [Newtonsoft.Json.JsonProperty("results", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Results { get; set; } + + [Newtonsoft.Json.JsonProperty("summary", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public BulkUpdateResponseSummary Summary { get; set; } + + } + + public partial class BulkUpdateResponseResult + { + + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public BulkUpdateResponseError Error { get; set; } + + [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsSuccess { get; set; } + + [Newtonsoft.Json.JsonProperty("shipmentId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long ShipmentId { get; set; } + + } + + public partial class BulkUpdateResponseSummary + { + + [Newtonsoft.Json.JsonProperty("failed", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Failed { get; set; } + + [Newtonsoft.Json.JsonProperty("successful", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Successful { get; set; } + + [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Total { get; set; } + + } + + /// + /// Model for updating tracking upload status for multiple shipments + /// + public partial class BulkUpdateTrackingUploadModel + { + + /// + /// Indicates whether the Shipment was marked with tracking information + ///
uploaded to a third-party system where the order originated. + ///
Applies to all shipments in shipment_ids + ///
+ [Newtonsoft.Json.JsonProperty("is_tracking_uploaded", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_tracking_uploaded { get; set; } + + /// + /// Shipment IDs to apply the tracking upload status to + /// + [Newtonsoft.Json.JsonProperty("shipment_ids", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Shipment_ids { get; set; } + + } + + /// + /// Model for cancel multiple shipments at once + /// + public partial class CancelShipmentsModel + { + + /// + /// Shipment IDs to cancel + /// + [Newtonsoft.Json.JsonProperty("shipment_ids", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Shipment_ids { get; set; } + + } + + public partial class CanceledOrderViewModel + { + + /// + /// Results of canceling the shipments associated with the order + /// + [Newtonsoft.Json.JsonProperty("canceled_shipment_results", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Canceled_shipment_results { get; set; } + + [Newtonsoft.Json.JsonProperty("order", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public OrderViewModel Order { get; set; } + + /// + /// The ID of the canceled order + /// + [Newtonsoft.Json.JsonProperty("order_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Order_id { get; set; } + + [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public CancellationResult Status { get; set; } + + } + + public partial class CanceledShipmentViewModel + { + + [Newtonsoft.Json.JsonProperty("action", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public ShipmentAction Action { get; set; } + + /// + /// If the cancel action was successful + /// + [Newtonsoft.Json.JsonProperty("is_success", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_success { get; set; } + + /// + /// The reason the cancellation result + /// + [Newtonsoft.Json.JsonProperty("reason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reason { get; set; } + + /// + /// The ID of the shipment + /// + [Newtonsoft.Json.JsonProperty("shipment_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Shipment_id { get; set; } + + } + + public partial class CanceledShipmentsViewModel + { + + /// + /// The results of all cancellation actions + /// + [Newtonsoft.Json.JsonProperty("results", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Results { get; set; } + + } + + public enum CancellationResult + { + + [System.Runtime.Serialization.EnumMember(Value = @"Success")] + Success = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"Failure")] + Failure = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"PartialSuccess")] + PartialSuccess = 2, + + } + + public enum CarrierShipType + { + + [System.Runtime.Serialization.EnumMember(Value = @"Parcel")] + Parcel = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"Freight")] + Freight = 1, + + } + + public partial class CartonDetailsViewModel + { + + /// + /// List of what is packed in this carton + /// + [Newtonsoft.Json.JsonProperty("products", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Products { get; set; } + + } + + /// + /// Measurements of a carton + /// + public partial class CartonMeasurementsViewModel + { + + /// + /// Total depth in inches + /// + [Newtonsoft.Json.JsonProperty("depth_in", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Depth_in { get; set; } + + /// + /// Total length in inches + /// + [Newtonsoft.Json.JsonProperty("length_in", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Length_in { get; set; } + + /// + /// Total weight in ounces + /// + [Newtonsoft.Json.JsonProperty("total_weight_oz", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Total_weight_oz { get; set; } + + /// + /// Total width in inches + /// + [Newtonsoft.Json.JsonProperty("width_in", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Width_in { get; set; } + + } + + public partial class CartonViewModel + { + + /// + /// Barcode assigned to this carton + /// + [Newtonsoft.Json.JsonProperty("barcode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Barcode { get; set; } + + /// + /// Details about the contents of this carton + /// + [Newtonsoft.Json.JsonProperty("carton_details", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Carton_details { get; set; } + + /// + /// ID assigned to this carton + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Id { get; set; } + + [Newtonsoft.Json.JsonProperty("measurements", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public CartonMeasurementsViewModel Measurements { get; set; } + + /// + /// Type of this carton container + /// + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Type { get; set; } + + } + + /// + /// Created by channel metadata + /// + public partial class ChannelInfoViewModel + { + + /// + /// Unique id of the channel + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Id { get; set; } + + /// + /// Name of the channel + /// + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + } + + public partial class CreateOrderModel + { + + [Newtonsoft.Json.JsonProperty("financials", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Financials Financials { get; set; } + + /// + /// Gift message associated with the order + /// + [Newtonsoft.Json.JsonProperty("gift_message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(500)] + public string Gift_message { get; set; } + + /// + /// Desired Fulfillment Center Location ID. If not specified, ShipBob will determine the location that fulfills this order. + /// + [Newtonsoft.Json.JsonProperty("location_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Location_id { get; set; } + + /// + /// User friendly orderId or store order number that will be shown on the Orders Page. If not provided, referenceId will be used + /// + [Newtonsoft.Json.JsonProperty("order_number", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(400)] + public string Order_number { get; set; } + + /// + /// Origin platform program for the order. Accepts a program name. + /// + [Newtonsoft.Json.JsonProperty("origin_platform_program", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(100)] + public string Origin_platform_program { get; set; } + + /// + /// Products included in the order. Products identified by reference_id must also include the product name if there is no matching ShipBob product. + /// + [Newtonsoft.Json.JsonProperty("products", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + [System.ComponentModel.DataAnnotations.MinLength(1)] + public System.Collections.Generic.ICollection Products { get; set; } = new System.Collections.ObjectModel.Collection(); + + /// + /// Date this order was purchase by the end user + /// + [Newtonsoft.Json.JsonProperty("purchase_date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Purchase_date { get; set; } + + [Newtonsoft.Json.JsonProperty("recipient", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public RecipientInfoViewModel Recipient { get; set; } = new RecipientInfoViewModel(); + + /// + /// Unique and immutable order identifier from your upstream system + /// + [Newtonsoft.Json.JsonProperty("reference_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(300, MinimumLength = 1)] + public string Reference_id { get; set; } + + [Newtonsoft.Json.JsonProperty("retailer_program_data", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public RetailerProgramDataViewModel Retailer_program_data { get; set; } + + /// + /// Origin platform source for the order. Accepts a sales channel name that is case insensitive and the list of acceptable values can be found at https://support.shipbob.com/s/article/ShipBob-Developer-API + /// + [Newtonsoft.Json.JsonProperty("sales_channel", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(100)] + public string Sales_channel { get; set; } + + /// + /// Client-defined shipping method matching what the user has listed as the shipping method on the Ship Option Mapping setup page in the ShipBob Merchant Portal. If they don’t match, we will create a new one and default it to Standard + /// + [Newtonsoft.Json.JsonProperty("shipping_method", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(int.MaxValue, MinimumLength = 1)] + public string Shipping_method { get; set; } + + [Newtonsoft.Json.JsonProperty("shipping_terms", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ShippingTermsViewModel Shipping_terms { get; set; } + + /// + /// Key value pair array to store extra information at the order level for API purposes. ShipBob won't display the info in the ShipBob Merchant Portal or react based on this data. + /// + [Newtonsoft.Json.JsonProperty("tags", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Tags { get; set; } + + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public OrderType Type { get; set; } + + } + + public partial class EstimateDetailViewModel + { + + /// + /// Estimated local currency code + /// + [Newtonsoft.Json.JsonProperty("estimated_currency_code", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Estimated_currency_code { get; set; } + + /// + /// Estimated price in dollars for the provided shipping method + /// + [Newtonsoft.Json.JsonProperty("estimated_price", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Estimated_price { get; set; } + + [Newtonsoft.Json.JsonProperty("fulfillment_center", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public FulfillmentCenterViewModel Fulfillment_center { get; set; } + + /// + /// Provided shipping method. Maps to ship option in ShipBob. + /// + [Newtonsoft.Json.JsonProperty("shipping_method", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Shipping_method { get; set; } + + /// + /// Total weight of items in cart including packaging. + /// + [Newtonsoft.Json.JsonProperty("total_weight_oz", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Total_weight_oz { get; set; } + + } + + public partial class EstimateFulfillmentRequestModel + { + + [Newtonsoft.Json.JsonProperty("address", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public EstimationAddressViewModel Address { get; set; } = new EstimationAddressViewModel(); + + /// + /// Products to be included in the order. Each product must include one of reference_id or id + /// + [Newtonsoft.Json.JsonProperty("products", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public System.Collections.Generic.ICollection Products { get; set; } = new System.Collections.ObjectModel.Collection(); + + /// + /// Array of strings specifying shipping methods for which to fetch estimates. + ///
+ ///
If this field is omitted we will return estimates for all shipping methods defined in ShipBob + ///
+ [Newtonsoft.Json.JsonProperty("shipping_methods", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Shipping_methods { get; set; } + + } + + public partial class EstimateProductInfoModel + { + + /// + /// Unique id of the product (Must be provided if reference_id is unknown) + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Id { get; set; } + + /// + /// The quantity of this product ordered + /// + [Newtonsoft.Json.JsonProperty("quantity", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Range(1, 199)] + public int Quantity { get; set; } + + /// + /// Unique reference id of the product (Must be provided if ID is unknown) + /// + [Newtonsoft.Json.JsonProperty("reference_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reference_id { get; set; } + + } + + public partial class EstimateViewModel + { + + /// + /// Array of estimates for each shipping method + /// + [Newtonsoft.Json.JsonProperty("estimates", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Estimates { get; set; } + + } + + public partial class EstimationAddressViewModel + { + + /// + /// First line of the address + /// + [Newtonsoft.Json.JsonProperty("address1", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Address1 { get; set; } + + /// + /// Second line of the address + /// + [Newtonsoft.Json.JsonProperty("address2", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Address2 { get; set; } + + /// + /// The city + /// + [Newtonsoft.Json.JsonProperty("city", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string City { get; set; } + + /// + /// Name of the company receiving the shipment + /// + [Newtonsoft.Json.JsonProperty("company_name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Company_name { get; set; } + + /// + /// The country (Must be ISO Alpha-2 for estimates) + /// + [Newtonsoft.Json.JsonProperty("country", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public string Country { get; set; } + + /// + /// The state or province + /// + [Newtonsoft.Json.JsonProperty("state", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string State { get; set; } + + /// + /// The zip code or postal code + /// + [Newtonsoft.Json.JsonProperty("zip_code", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Zip_code { get; set; } + + } + + public partial class Financials + { + + /// + /// Sum of all line item prices, discounts, and taxes in USD + /// + [Newtonsoft.Json.JsonProperty("total_price", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? Total_price { get; set; } + + } + + /// + /// Information about a fulfillment center that a shipment can belong to + /// + public partial class FulfillmentCenterViewModel + { + + /// + /// Id of the fulfillment center + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Id { get; set; } + + /// + /// Name of the fulfillment center + /// + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + } + + public enum FulfillmentStatus + { + + [System.Runtime.Serialization.EnumMember(Value = @"AwaitingInventoryAllocation")] + AwaitingInventoryAllocation = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"AwaitingReset")] + AwaitingReset = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"Unavailable")] + Unavailable = 2, + + [System.Runtime.Serialization.EnumMember(Value = @"PendingOnTime")] + PendingOnTime = 3, + + [System.Runtime.Serialization.EnumMember(Value = @"FulfilledOnTime")] + FulfilledOnTime = 4, + + [System.Runtime.Serialization.EnumMember(Value = @"PendingLate")] + PendingLate = 5, + + [System.Runtime.Serialization.EnumMember(Value = @"FulfilledLate")] + FulfilledLate = 6, + + } + + public partial class Object : System.Collections.Generic.Dictionary> + { + + } + + public partial class Object2 : System.Collections.Generic.Dictionary> + { + + } + + public partial class IntegerArray5 : System.Collections.ObjectModel.Collection + { + + } + + public partial class Object3 : System.Collections.Generic.Dictionary> + { + + } + + public partial class Object4 : System.Collections.Generic.Dictionary> + { + + } + + public partial class OneOfArray2 : System.Collections.ObjectModel.Collection + { + + } + + public partial class Object5 : System.Collections.Generic.Dictionary> + { + + } + + public partial class Object6 : System.Collections.Generic.Dictionary> + { + + } + + /// + /// Information about a shipment + /// + public partial class InternalShipmentViewModel + { + + /// + /// The datetime of ShipBob’s completion of the fulfillment operation as promised. + ///
Currently, this means the shipment has been picked, packed, and label has been printed. + ///
+ [Newtonsoft.Json.JsonProperty("actual_fulfillment_date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Actual_fulfillment_date { get; set; } + + /// + /// Date this shipment was created + /// + [Newtonsoft.Json.JsonProperty("created_date", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset Created_date { get; set; } + + /// + /// The datetime of Shipment delivered to customer. + /// + [Newtonsoft.Json.JsonProperty("delivery_date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Delivery_date { get; set; } + + /// + /// The datetime of ShipBob’s commitment for completing + ///
the shipment and handing to the carrier for delivery. + ///
+ [Newtonsoft.Json.JsonProperty("estimated_fulfillment_date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Estimated_fulfillment_date { get; set; } + + [Newtonsoft.Json.JsonProperty("estimated_fulfillment_date_status", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public FulfillmentStatus Estimated_fulfillment_date_status { get; set; } + + /// + /// Gift message associated with the shipment + /// + [Newtonsoft.Json.JsonProperty("gift_message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(500)] + public string Gift_message { get; set; } + + /// + /// Unique id of the shipment + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Id { get; set; } + + /// + /// Monetary amount that this shipment was insured for + /// + [Newtonsoft.Json.JsonProperty("insurance_value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? Insurance_value { get; set; } + + /// + /// Monetary amount that was invoiced for this shipment + /// + [Newtonsoft.Json.JsonProperty("invoice_amount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? Invoice_amount { get; set; } + + [Newtonsoft.Json.JsonProperty("invoice_currency_code", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Invoice_currency_code { get; set; } + + /// + /// Indicates whether the Shipment was marked with tracking information + ///
uploaded to a third-party system where the order originated. + ///
+ [Newtonsoft.Json.JsonProperty("is_tracking_uploaded", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_tracking_uploaded { get; set; } + + /// + /// Timestamp for the last time this shipment had a tracking update + /// + [Newtonsoft.Json.JsonProperty("last_tracking_update_at", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Last_tracking_update_at { get; set; } + + /// + /// Date this shipment was last updated + /// + [Newtonsoft.Json.JsonProperty("last_update_at", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Last_update_at { get; set; } + + [Newtonsoft.Json.JsonProperty("location", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public FulfillmentCenterViewModel Location { get; set; } + + [Newtonsoft.Json.JsonProperty("measurements", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public MeasurementsViewModel Measurements { get; set; } + + /// + /// Id of the order this shipment belongs to + /// + [Newtonsoft.Json.JsonProperty("order_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Order_id { get; set; } + + [Newtonsoft.Json.JsonProperty("package_material_type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public PackageMaterialType Package_material_type { get; set; } + + /// + /// Carton information for this shipment + /// + [Newtonsoft.Json.JsonProperty("parent_cartons", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Parent_cartons { get; set; } + + /// + /// Information about the products contained in this shipment + /// + [Newtonsoft.Json.JsonProperty("products", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Products { get; set; } + + [Newtonsoft.Json.JsonProperty("recipient", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public RecipientViewModel Recipient { get; set; } + + /// + /// Client-defined external unique id of the order this shipment belongs to + /// + [Newtonsoft.Json.JsonProperty("reference_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reference_id { get; set; } + + /// + /// If a shipment requires signature + /// + [Newtonsoft.Json.JsonProperty("require_signature", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Require_signature { get; set; } + + /// + /// Name of the shipping option used for this shipment + /// + [Newtonsoft.Json.JsonProperty("ship_option", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Ship_option { get; set; } + + [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public OrderStatusEnum Status { get; set; } + + /// + /// Additional details about the shipment status + /// + [Newtonsoft.Json.JsonProperty("status_details", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Status_details { get; set; } + + [Newtonsoft.Json.JsonProperty("tracking", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public TrackingViewModel Tracking { get; set; } + + } + + public partial class Object7 : System.Collections.Generic.Dictionary> + { + + } + + public partial class Object8 : System.Collections.Generic.Dictionary> + { + + } + + public partial class Object9 : System.Collections.Generic.Dictionary> + { + + } + + public partial class StringArray2 : System.Collections.ObjectModel.Collection + { + + } + + public partial class Object10 : System.Collections.Generic.Dictionary> + { + + } + + public partial class Object11 : System.Collections.Generic.Dictionary> + { + + } + + public partial class Object12 : System.Collections.Generic.Dictionary> + { + + } + + public partial class Object13 : System.Collections.Generic.Dictionary> + { + + } + + public partial class Object14 : System.Collections.Generic.Dictionary> + { + + } + + public partial class InternalShipmentViewModel2 : InternalShipmentViewModel + { + + /// + /// Unique store order id of the shipment + /// + [Newtonsoft.Json.JsonProperty("store_order_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Store_order_id { get; set; } + + } + + public partial class InventoryPickedNotShippedViewModel + { + + /// + /// Expiration date of the inventory + /// + [Newtonsoft.Json.JsonProperty("expiration_date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Expiration_date { get; set; } + + [Newtonsoft.Json.JsonProperty("fulfillment_center_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Fulfillment_center_id { get; set; } + + [Newtonsoft.Json.JsonProperty("inventory_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Inventory_id { get; set; } + + /// + /// Lot number of the inventory + /// + [Newtonsoft.Json.JsonProperty("lot_number", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Lot_number { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Quantity { get; set; } + + [Newtonsoft.Json.JsonProperty("sku", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Sku { get; set; } + + } + + public partial class InventoryPickedNotShippedViewModelArray : System.Collections.ObjectModel.Collection + { + + } + + /// + /// Information about inventory belonging to a store product + /// + public partial class InventoryViewModel + { + + /// + /// Expiration date of the inventory + /// + [Newtonsoft.Json.JsonProperty("expiration_date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Expiration_date { get; set; } + + /// + /// Unique id of the inventory + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Id { get; set; } + + /// + /// Is inventory Dangerous Good + /// + [Newtonsoft.Json.JsonProperty("is_dangerous_goods", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_dangerous_goods { get; set; } + + /// + /// Lot number of the inventory + /// + [Newtonsoft.Json.JsonProperty("lot", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Lot { get; set; } + + /// + /// Name of the inventory item + /// + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// Quantity of the inventory item to be included in the fulfillment + /// + [Newtonsoft.Json.JsonProperty("quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Quantity { get; set; } + + /// + /// The quantity of the inventory item allocated from the assigned fulfillment center and committed to the order. If quantity committed is less than order quantity, then the inventory item is out of stock at the assigned fulfillment center. + /// + [Newtonsoft.Json.JsonProperty("quantity_committed", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Quantity_committed { get; set; } + + /// + /// Serial number of the inventory + /// + [Newtonsoft.Json.JsonProperty("serial_numbers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Serial_numbers { get; set; } + + } + + /// + /// Measurements of a shipment + /// + public partial class MeasurementsViewModel + { + + /// + /// Total depth in inches + /// + [Newtonsoft.Json.JsonProperty("depth_in", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Depth_in { get; set; } + + /// + /// Total length in inches + /// + [Newtonsoft.Json.JsonProperty("length_in", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Length_in { get; set; } + + /// + /// Total weight in ounces + /// + [Newtonsoft.Json.JsonProperty("total_weight_oz", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Total_weight_oz { get; set; } + + /// + /// Total width in inches + /// + [Newtonsoft.Json.JsonProperty("width_in", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Width_in { get; set; } + + } + + public partial class OrderShipmentIdsViewModel + { + + /// + /// Unique id of the order + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Id { get; set; } + + /// + /// User-friendly orderId or store order number that will be shown on the Orders Page. If not provided, referenceId + ///
will be used + ///
+ [Newtonsoft.Json.JsonProperty("order_number", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Order_number { get; set; } + + /// + /// Shipments Ids affiliated with the order + /// + [Newtonsoft.Json.JsonProperty("shipment_ids", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Shipment_ids { get; set; } + + } + + public partial class OrderShipmentIdsViewModelArray : System.Collections.ObjectModel.Collection + { + + } + + public enum OrderStatus + { + + [System.Runtime.Serialization.EnumMember(Value = @"Processing")] + Processing = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"Exception")] + Exception = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"PartiallyFulfilled")] + PartiallyFulfilled = 2, + + [System.Runtime.Serialization.EnumMember(Value = @"Fulfilled")] + Fulfilled = 3, + + [System.Runtime.Serialization.EnumMember(Value = @"Cancelled")] + Cancelled = 4, + + [System.Runtime.Serialization.EnumMember(Value = @"ImportReview")] + ImportReview = 5, + + } + + public enum OrderStatusEnum + { + + [System.Runtime.Serialization.EnumMember(Value = @"None")] + None = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"Processing")] + Processing = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"Completed")] + Completed = 2, + + [System.Runtime.Serialization.EnumMember(Value = @"Exception")] + Exception = 3, + + [System.Runtime.Serialization.EnumMember(Value = @"OnHold")] + OnHold = 4, + + [System.Runtime.Serialization.EnumMember(Value = @"Cancelled")] + Cancelled = 5, + + [System.Runtime.Serialization.EnumMember(Value = @"CleanSweeped")] + CleanSweeped = 6, + + [System.Runtime.Serialization.EnumMember(Value = @"LabeledCreated")] + LabeledCreated = 7, + + [System.Runtime.Serialization.EnumMember(Value = @"ImportReview")] + ImportReview = 8, + + } + + public enum OrderType + { + + [System.Runtime.Serialization.EnumMember(Value = @"DTC")] + DTC = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"DropShip")] + DropShip = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"B2B")] + B2B = 2, + + } + + /// + /// Request model for verify and save address for order + /// + public partial class OrderVerifyAndSaveAddressRequest + { + + /// + /// Country code of customer address + /// + [Newtonsoft.Json.JsonProperty("CountryCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string CountryCode { get; set; } + + /// + /// IsDomestic flag + /// + [Newtonsoft.Json.JsonProperty("IsDomestic", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsDomestic { get; set; } + + /// + /// IsPoBox flag + /// + [Newtonsoft.Json.JsonProperty("IsPoBox", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsPoBox { get; set; } + + /// + /// IsValid flag + /// + [Newtonsoft.Json.JsonProperty("IsValid", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsValid { get; set; } + + /// + /// OrderId + /// + [Newtonsoft.Json.JsonProperty("OrderId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int OrderId { get; set; } + + /// + /// Override Verification Flag + /// + [Newtonsoft.Json.JsonProperty("OverrideVerification", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool OverrideVerification { get; set; } + + /// + /// Phonenumber of customer address + /// + [Newtonsoft.Json.JsonProperty("PhoneNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string PhoneNumber { get; set; } + + /// + /// Street Address 1 + /// + [Newtonsoft.Json.JsonProperty("StreetAddress1", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(int.MaxValue, MinimumLength = 1)] + public string StreetAddress1 { get; set; } + + /// + /// Streed Address 2 + /// + [Newtonsoft.Json.JsonProperty("StreetAddress2", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string StreetAddress2 { get; set; } + + /// + /// Zipcode of customer address + /// + [Newtonsoft.Json.JsonProperty("ZipCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ZipCode { get; set; } + + /// + /// City of customer address + /// + [Newtonsoft.Json.JsonProperty("city", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public string City { get; set; } + + /// + /// Customer's email address + /// + [Newtonsoft.Json.JsonProperty("email", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Email { get; set; } + + /// + /// Name of customer + /// + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// State of customer address + /// + [Newtonsoft.Json.JsonProperty("state", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string State { get; set; } + + } + + public partial class OrderViewModel + { + + [Newtonsoft.Json.JsonProperty("channel", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ChannelInfoViewModel Channel { get; set; } + + /// + /// Date this order was created + /// + [Newtonsoft.Json.JsonProperty("created_date", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset Created_date { get; set; } + + [Newtonsoft.Json.JsonProperty("financials", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Financials Financials { get; set; } + + /// + /// Gift message associated with the order + /// + [Newtonsoft.Json.JsonProperty("gift_message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Gift_message { get; set; } + + /// + /// Unique id of the order + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Id { get; set; } + + /// + /// User friendly orderId or store order number that will be shown on the Orders Page. If not provided, referenceId will be used + /// + [Newtonsoft.Json.JsonProperty("order_number", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Order_number { get; set; } + + /// + /// List of products included in the order + /// + [Newtonsoft.Json.JsonProperty("products", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Products { get; set; } + + /// + /// Date this order was purchase by the end user + /// + [Newtonsoft.Json.JsonProperty("purchase_date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Purchase_date { get; set; } + + [Newtonsoft.Json.JsonProperty("recipient", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public RecipientInfoViewModel Recipient { get; set; } + + /// + /// Client-defined external unique id of the order + /// + [Newtonsoft.Json.JsonProperty("reference_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reference_id { get; set; } + + [Newtonsoft.Json.JsonProperty("retailer_program_data", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public RetailerProgramDataViewModel Retailer_program_data { get; set; } + + /// + /// Shipments affiliated with the order + /// + [Newtonsoft.Json.JsonProperty("shipments", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Shipments { get; set; } + + /// + /// Client-defined shipping method + /// + [Newtonsoft.Json.JsonProperty("shipping_method", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Shipping_method { get; set; } + + [Newtonsoft.Json.JsonProperty("shipping_terms", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ShippingTermsViewModel Shipping_terms { get; set; } + + [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public OrderStatus Status { get; set; } + + /// + /// Client-defined order tags + /// + [Newtonsoft.Json.JsonProperty("tags", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Tags { get; set; } + + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public OrderType Type { get; set; } + + } + + public partial class OrderViewModelArray : System.Collections.ObjectModel.Collection + { + + } + + public enum PackageMaterialType + { + + [System.Runtime.Serialization.EnumMember(Value = @"Unknown")] + Unknown = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"Box")] + Box = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"BubbleMailer")] + BubbleMailer = 2, + + [System.Runtime.Serialization.EnumMember(Value = @"PolyMailer")] + PolyMailer = 3, + + [System.Runtime.Serialization.EnumMember(Value = @"FragileBox")] + FragileBox = 4, + + [System.Runtime.Serialization.EnumMember(Value = @"PosterTube")] + PosterTube = 5, + + [System.Runtime.Serialization.EnumMember(Value = @"Custom")] + Custom = 6, + + [System.Runtime.Serialization.EnumMember(Value = @"Bookfold")] + Bookfold = 7, + + [System.Runtime.Serialization.EnumMember(Value = @"OwnContainer")] + OwnContainer = 8, + + [System.Runtime.Serialization.EnumMember(Value = @"Undefined")] + Undefined = 9, + + } + + public partial class ParentCartonViewModel + { + + /// + /// Barcode assigned to this carton + /// + [Newtonsoft.Json.JsonProperty("barcode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Barcode { get; set; } + + /// + /// Cartons packed inside this parent container + /// + [Newtonsoft.Json.JsonProperty("cartons", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Cartons { get; set; } + + [Newtonsoft.Json.JsonProperty("measurements", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public CartonMeasurementsViewModel Measurements { get; set; } + + /// + /// Type of this carton container + /// + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Type { get; set; } + + } + + public enum PaymentShipTerm + { + + [System.Runtime.Serialization.EnumMember(Value = @"Collect")] + Collect = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"ThirdParty")] + ThirdParty = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"Prepaid")] + Prepaid = 2, + + [System.Runtime.Serialization.EnumMember(Value = @"MerchantResponsible")] + MerchantResponsible = 3, + + } + + public partial class Object15 : System.Collections.Generic.Dictionary> + { + + } + + public partial class Object16 : System.Collections.Generic.Dictionary> + { + + } + + public partial class Object17 : System.Collections.Generic.Dictionary> + { + + } + + public partial class Object18 : System.Collections.Generic.Dictionary> + { + + } + + public partial class Object19 : System.Collections.Generic.Dictionary> + { + + } + + public partial class Object20 : System.Collections.Generic.Dictionary> + { + + } + + public partial class Object21 : System.Collections.Generic.Dictionary> + { + + } + + public partial class Object22 : System.Collections.Generic.Dictionary> + { + + } + + public partial class Object23 : System.Collections.Generic.Dictionary> + { + + } + + public partial class Object24 : System.Collections.Generic.Dictionary> + { + + } + + public partial class Object25 : System.Collections.Generic.Dictionary> + { + + } + + public partial class Object26 : System.Collections.Generic.Dictionary> + { + + } + + public partial class Object27 : System.Collections.Generic.Dictionary> + { + + } + + public partial class Object28 : System.Collections.Generic.Dictionary> + { + + } + + public partial class Object29 : System.Collections.Generic.Dictionary> + { + + } + + public partial class Object30 : System.Collections.Generic.Dictionary> + { + + } + + public partial class Object31 : System.Collections.Generic.Dictionary> + { + + } + + public partial class ProductInfoViewModel + { + + /// + /// Numeric assignment per item. Used as a reference number for multiple purposes such as split orders, split containers, etc. + /// + [Newtonsoft.Json.JsonProperty("external_line_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? External_line_id { get; set; } + + /// + /// Global Trade Item Number - unique and internationally recognized identifier assigned to item by company GS1 + /// + [Newtonsoft.Json.JsonProperty("gtin", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Gtin { get; set; } + + /// + /// Unique id of the product + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Id { get; set; } + + /// + /// The quantity of this product ordered + /// + [Newtonsoft.Json.JsonProperty("quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Quantity { get; set; } + + /// + /// Defined standard for measure for an item (each, inner pack, case, pallet). Values: EA, INP, CS and PL + /// + [Newtonsoft.Json.JsonProperty("quantity_unit_of_measure_code", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Quantity_unit_of_measure_code { get; set; } + + /// + /// Unique reference id of the product + /// + [Newtonsoft.Json.JsonProperty("reference_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reference_id { get; set; } + + /// + /// Stock keeping unit for the product + /// + [Newtonsoft.Json.JsonProperty("sku", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Sku { get; set; } + + /// + /// Price for one item + /// + [Newtonsoft.Json.JsonProperty("unit_price", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? Unit_price { get; set; } + + /// + /// Universal Product Code - Unique external identifier + /// + [Newtonsoft.Json.JsonProperty("upc", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Upc { get; set; } + + } + + public partial class Object32 : System.Collections.Generic.Dictionary> + { + + } + + public partial class OneOfArray3 : System.Collections.ObjectModel.Collection + { + + } + + /// + /// Information about the recipient of an order + /// + public partial class RecipientInfoViewModel + { + + /// + /// Address of the recipient + /// + [Newtonsoft.Json.JsonProperty("address", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public AddressViewModel2 Address { get; set; } + + /// + /// Email address of the recipient + /// + [Newtonsoft.Json.JsonProperty("email", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Email { get; set; } + + /// + /// Name of the recipient + /// + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + [System.ComponentModel.DataAnnotations.StringLength(300, MinimumLength = 1)] + public string Name { get; set; } + + /// + /// Phone number of the recipient + /// + [Newtonsoft.Json.JsonProperty("phone_number", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(50)] + public string Phone_number { get; set; } + + } + + /// + /// Information about the recipient of a shipment + /// + public partial class RecipientViewModel + { + + /// + /// Address of the recipient + /// + [Newtonsoft.Json.JsonProperty("address", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public AddressViewModel2 Address { get; set; } + + /// + /// Email address of the recipient + /// + [Newtonsoft.Json.JsonProperty("email", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Email { get; set; } + + /// + /// FullName of the recipient + /// + [Newtonsoft.Json.JsonProperty("full_name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Full_name { get; set; } + + /// + /// Name of the recipient + /// + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// Phone number of the recipient + /// + [Newtonsoft.Json.JsonProperty("phone_number", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Phone_number { get; set; } + + } + + /// + /// Address to used when creating a B2B/DropShip order. + /// + public partial class RetailerProgramDataAddressViewModel : AddressViewModel2 + { + + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public AddressType Type { get; set; } + + } + + /// + /// Contains properties that needs to be used for fulfilling B2B/Dropship orders. + /// + public partial class RetailerProgramDataViewModel + { + + /// + /// Ship From - Certain retailers want to display the ship from address as their return facility, not Shipbob’s warehouse address /// + ///
Mark For Address - Final destination address + ///
+ [Newtonsoft.Json.JsonProperty("addresses", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Addresses { get; set; } + + /// + /// Customer Ticket Number + /// + [Newtonsoft.Json.JsonProperty("customer_ticket_number", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Customer_ticket_number { get; set; } + + /// + /// Expected delivery date + /// + [Newtonsoft.Json.JsonProperty("delivery_date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Delivery_date { get; set; } + + /// + /// Identifies a merchant's store department + /// + [Newtonsoft.Json.JsonProperty("department", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Department { get; set; } + + /// + /// The date the retailer does not want the order shipped by. + /// + [Newtonsoft.Json.JsonProperty("doNotShipBeforeDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? DoNotShipBeforeDate { get; set; } + + /// + /// Store Number + /// + [Newtonsoft.Json.JsonProperty("mark_for_store", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Mark_for_store { get; set; } + + /// + /// First initial documentation sent from buyer to seller with item(s) and quantities. + /// + [Newtonsoft.Json.JsonProperty("purchase_order_number", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(int.MaxValue, MinimumLength = 1)] + public string Purchase_order_number { get; set; } + + /// + /// Identifies retailer-merchant combination + /// + [Newtonsoft.Json.JsonProperty("retailer_program_type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(int.MaxValue, MinimumLength = 1)] + public string Retailer_program_type { get; set; } + + /// + /// The date the retailer has requested the order to ship by. + /// + [Newtonsoft.Json.JsonProperty("shipByDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? ShipByDate { get; set; } + + } + + public partial class ServiceLevelDetailViewModel + { + + /// + /// Unique id for the service level + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Id { get; set; } + + /// + /// The name or title of the service level + /// + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + } + + public partial class ShipMethodDetailViewModel + { + + /// + /// Indicates if the shipping method is active + /// + [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Active { get; set; } + + /// + /// Indicates the shipping method is a ShipBob default shipping method. + /// + [Newtonsoft.Json.JsonProperty("default", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Default { get; set; } + + /// + /// Unique id for shipping method. + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Id { get; set; } + + /// + /// Name of the ship method as selected by the merchant and saved in ShipBob’s database (i.e. “ground”). Corresponds to the shipping_method field in the Orders API. + /// + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("service_level", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ServiceLevelDetailViewModel Service_level { get; set; } + + } + + public partial class ShipMethodDetailViewModelArray : System.Collections.ObjectModel.Collection + { + + } + + public enum ShipmentAction + { + + [System.Runtime.Serialization.EnumMember(Value = @"CleanSweep")] + CleanSweep = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"Reassign")] + Reassign = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"ReleaseOrderHold")] + ReleaseOrderHold = 2, + + [System.Runtime.Serialization.EnumMember(Value = @"MoveToOnHoldAndKeepInventory")] + MoveToOnHoldAndKeepInventory = 3, + + [System.Runtime.Serialization.EnumMember(Value = @"MoveToOnHoldAndReleaseInventory")] + MoveToOnHoldAndReleaseInventory = 4, + + [System.Runtime.Serialization.EnumMember(Value = @"Cancel")] + Cancel = 5, + + [System.Runtime.Serialization.EnumMember(Value = @"AddLineItem")] + AddLineItem = 6, + + [System.Runtime.Serialization.EnumMember(Value = @"RemoveLineItem")] + RemoveLineItem = 7, + + [System.Runtime.Serialization.EnumMember(Value = @"UpdateShipOption")] + UpdateShipOption = 8, + + } + + public partial class ShipmentLogViewModel + { + + /// + /// Log type id of the shipment + /// + [Newtonsoft.Json.JsonProperty("log_type_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Log_type_id { get; set; } + + /// + /// Name of the log type + /// + [Newtonsoft.Json.JsonProperty("log_type_name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Log_type_name { get; set; } + + /// + /// Summary of log type meaning + /// + [Newtonsoft.Json.JsonProperty("log_type_text", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Log_type_text { get; set; } + + /// + /// Specifics data for the event + /// + [Newtonsoft.Json.JsonProperty("metadata", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.IDictionary Metadata { get; set; } + + /// + /// Timestamp of event + /// + [Newtonsoft.Json.JsonProperty("timestamp", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset Timestamp { get; set; } + + } + + public partial class ShipmentLogViewModelArray : System.Collections.ObjectModel.Collection + { + + } + + /// + /// Information about a store product belonging to a shipment + /// + public partial class ShipmentProductViewModel + { + + /// + /// Unique id of the product + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Id { get; set; } + + /// + /// Information about fulfillable inventory items belonging to this product + /// + [Newtonsoft.Json.JsonProperty("inventory_items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Inventory_items { get; set; } + + /// + /// Name of the product + /// + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// Unique reference id of the product + /// + [Newtonsoft.Json.JsonProperty("reference_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reference_id { get; set; } + + /// + /// Stock keeping unit for the product + /// + [Newtonsoft.Json.JsonProperty("sku", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Sku { get; set; } + + } + + public enum ShipmentStatusFilter + { + + [System.Runtime.Serialization.EnumMember(Value = @"Processing")] + Processing = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"OnHold")] + OnHold = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"Exception")] + Exception = 2, + + [System.Runtime.Serialization.EnumMember(Value = @"Picked")] + Picked = 3, + + [System.Runtime.Serialization.EnumMember(Value = @"Packed")] + Packed = 4, + + [System.Runtime.Serialization.EnumMember(Value = @"Shipped")] + Shipped = 5, + + [System.Runtime.Serialization.EnumMember(Value = @"InTransit")] + InTransit = 6, + + [System.Runtime.Serialization.EnumMember(Value = @"Delivered")] + Delivered = 7, + + [System.Runtime.Serialization.EnumMember(Value = @"DeliveryException")] + DeliveryException = 8, + + } + + public partial class ShipmentStatusViewModel + { + + /// + /// Unique ShipBob Id of the Fulfillment Center to which the shipment was assigned + /// + [Newtonsoft.Json.JsonProperty("location_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Location_id { get; set; } + + /// + /// Unique ShipBob Id of the parent order + /// + [Newtonsoft.Json.JsonProperty("order_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Order_id { get; set; } + + /// + /// The Reference Id ingested with the original order + /// + [Newtonsoft.Json.JsonProperty("reference_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reference_id { get; set; } + + /// + /// Unique ShipBob Id of the shipment + /// + [Newtonsoft.Json.JsonProperty("shipment_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Shipment_id { get; set; } + + /// + /// Datetime when the shipment entered into the requested status (according to request filters) + /// + [Newtonsoft.Json.JsonProperty("status_datetime", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset Status_datetime { get; set; } + + /// + /// The Store Order Id ingested with the original order + /// + [Newtonsoft.Json.JsonProperty("store_order_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Store_order_id { get; set; } + + /// + /// The raw tag data ingested with the original store order + /// + [Newtonsoft.Json.JsonProperty("store_order_tags", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Store_order_tags { get; set; } + + } + + public partial class ShipmentStatusViewModelArray : System.Collections.ObjectModel.Collection + { + + } + + /// + /// Contains shipping properties that need to be used for fulfilling an order. + /// + public partial class ShippingTermsViewModel + { + + [Newtonsoft.Json.JsonProperty("carrier_type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public CarrierShipType Carrier_type { get; set; } + + [Newtonsoft.Json.JsonProperty("payment_term", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public PaymentShipTerm Payment_term { get; set; } + + } + + public enum SortOrder2 + { + + [System.Runtime.Serialization.EnumMember(Value = @"Newest")] + Newest = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"Oldest")] + Oldest = 1, + + } + + public partial class StatusDetailViewModel + { + + /// + /// Describes what the status detail means + /// + [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Description { get; set; } + + [Newtonsoft.Json.JsonProperty("exception_fulfillment_center_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Exception_fulfillment_center_id { get; set; } + + [Newtonsoft.Json.JsonProperty("extra_information", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public StatusInformationViewModel Extra_information { get; set; } + + /// + /// The id of the status detail + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Id { get; set; } + + /// + /// Inventory Id the detail applies to (if applicable) + /// + [Newtonsoft.Json.JsonProperty("inventory_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Inventory_id { get; set; } + + /// + /// Short name of the status detail + /// + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + } + + public partial class StatusInformationViewModel + { + + [Newtonsoft.Json.JsonProperty("validation_messages", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Validation_messages { get; set; } + + } + + public partial class TagViewModel + { + + /// + /// The key of the tag + /// + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + [System.ComponentModel.DataAnnotations.StringLength(50, MinimumLength = 1)] + public string Name { get; set; } + + /// + /// The value of the tag + /// + [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + [System.ComponentModel.DataAnnotations.StringLength(500, MinimumLength = 1)] + public string Value { get; set; } + + } + + /// + /// Tracking information for a shipment + /// + public partial class TrackingViewModel + { + + /// + /// Bill of lading (BOL) number. Document acknowledging receipt of cargo for shipment. + /// + [Newtonsoft.Json.JsonProperty("bol", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Bol { get; set; } + + /// + /// Carrier of the shipment + /// + [Newtonsoft.Json.JsonProperty("carrier", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Carrier { get; set; } + + /// + /// The carrier's service which was used for this shipment + /// + [Newtonsoft.Json.JsonProperty("carrier_service", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Carrier_service { get; set; } + + /// + /// Tracking number used for freight carriers + /// + [Newtonsoft.Json.JsonProperty("pro_number", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Pro_number { get; set; } + + /// + /// Standard Carrier Alpha Code (SCAC). Unique 2-4 letter code used to identify transportation companies. + /// + [Newtonsoft.Json.JsonProperty("scac", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Scac { get; set; } + + /// + /// Date freight was shipped on + /// + [Newtonsoft.Json.JsonProperty("shipping_date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Shipping_date { get; set; } + + /// + /// Tracking number of the shipment + /// + [Newtonsoft.Json.JsonProperty("tracking_number", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Tracking_number { get; set; } + + /// + /// URL to the website where a shipment can be tracked + /// + [Newtonsoft.Json.JsonProperty("tracking_url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Tracking_url { get; set; } + + } + + /// + /// Model for Updating multiple shipments of the same Order + /// + public partial class UpdateShipmentModel + { + + /// + /// Indicates whether the Shipment was marked with tracking information + ///
uploaded to a third-party system where the order originated. + ///
+ [Newtonsoft.Json.JsonProperty("is_tracking_uploaded", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_tracking_uploaded { get; set; } + + } + + public partial class AdditionalHazmatAttributesRequestModel + { + + [Newtonsoft.Json.JsonProperty("charge_state_percentage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? Charge_state_percentage { get; set; } + + [Newtonsoft.Json.JsonProperty("container_metal", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.Obsolete] + public bool? Container_metal { get; set; } + + [Newtonsoft.Json.JsonProperty("container_type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Container_type { get; set; } + + [Newtonsoft.Json.JsonProperty("lithium_battery_packaging", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Lithium_battery_packaging { get; set; } + + [Newtonsoft.Json.JsonProperty("lithium_battery_type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Lithium_battery_type { get; set; } + + [Newtonsoft.Json.JsonProperty("magnet", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? Magnet { get; set; } + + [Newtonsoft.Json.JsonProperty("net_volume", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? Net_volume { get; set; } + + [Newtonsoft.Json.JsonProperty("net_weight", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? Net_weight { get; set; } + + } + + public partial class AdditionalHazmatAttributesViewModel + { + + [Newtonsoft.Json.JsonProperty("charge_state_percentage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? Charge_state_percentage { get; set; } + + [Newtonsoft.Json.JsonProperty("container_metal", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.Obsolete] + public bool? Container_metal { get; set; } + + [Newtonsoft.Json.JsonProperty("container_type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Container_type { get; set; } + + [Newtonsoft.Json.JsonProperty("lithium_battery_packaging", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Lithium_battery_packaging { get; set; } + + [Newtonsoft.Json.JsonProperty("lithium_battery_type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Lithium_battery_type { get; set; } + + [Newtonsoft.Json.JsonProperty("magnet", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? Magnet { get; set; } + + [Newtonsoft.Json.JsonProperty("net_volume", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? Net_volume { get; set; } + + [Newtonsoft.Json.JsonProperty("net_weight", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? Net_weight { get; set; } + + } + + /// + /// Amazon Sales Channel Information with custom Amazon Fields + /// + public partial class AmazonChannelMetadataRequestModel : ChannelMetadataRequestModel + { + + [Newtonsoft.Json.JsonProperty("asin", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Asin { get; set; } + + [Newtonsoft.Json.JsonProperty("fnsku", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Fnsku { get; set; } + + [Newtonsoft.Json.JsonProperty("fulfillment_channel", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Fulfillment_channel { get; set; } + + [Newtonsoft.Json.JsonProperty("platform", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Platform { get; set; } + + } + + public partial class AmazonChannelMetadataViewModel : ChannelMetadataViewModel + { + + [Newtonsoft.Json.JsonProperty("asin", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Asin { get; set; } + + [Newtonsoft.Json.JsonProperty("fnsku", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Fnsku { get; set; } + + [Newtonsoft.Json.JsonProperty("fulfillment_channel", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Fulfillment_channel { get; set; } + + } + + public partial class AmazonProductChannelMetadataModel : BaseProductChannelMetadataModel + { + + [Newtonsoft.Json.JsonProperty("asin", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Asin { get; set; } + + [Newtonsoft.Json.JsonProperty("fnsku", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Fnsku { get; set; } + + [Newtonsoft.Json.JsonProperty("fulfillment_channel", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Fulfillment_channel { get; set; } + + } + + public partial class ApplicableCategoryViewModel + { + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Id { get; set; } + + [Newtonsoft.Json.JsonProperty("sub_category_ids", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Sub_category_ids { get; set; } + + } + + public partial class AssociatedBundlesViewModel + { + + [Newtonsoft.Json.JsonProperty("product_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Product_id { get; set; } + + [Newtonsoft.Json.JsonProperty("product_name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Product_name { get; set; } + + [Newtonsoft.Json.JsonProperty("quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Quantity { get; set; } + + [Newtonsoft.Json.JsonProperty("variant_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Variant_id { get; set; } + + [Newtonsoft.Json.JsonProperty("variant_sku", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Variant_sku { get; set; } + + } + + public partial class BarcodeModel + { + + [Newtonsoft.Json.JsonProperty("sticker_url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Sticker_url { get; set; } + + [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Value { get; set; } + + } + + public partial class BarcodeRequestModel + { + + [Newtonsoft.Json.JsonProperty("sticker_url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Sticker_url { get; set; } + + [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Value { get; set; } + + } + + public partial class BarcodeViewModel + { + + [Newtonsoft.Json.JsonProperty("sticker_url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Sticker_url { get; set; } + + [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Value { get; set; } + + } + + public partial class BaseAdditionalHazmatAttributesModel + { + + [Newtonsoft.Json.JsonProperty("charge_state_percentage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? Charge_state_percentage { get; set; } + + [Newtonsoft.Json.JsonProperty("container_metal", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.Obsolete] + public bool? Container_metal { get; set; } + + [Newtonsoft.Json.JsonProperty("container_type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Container_type { get; set; } + + [Newtonsoft.Json.JsonProperty("lithium_battery_packaging", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Lithium_battery_packaging { get; set; } + + [Newtonsoft.Json.JsonProperty("lithium_battery_type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Lithium_battery_type { get; set; } + + [Newtonsoft.Json.JsonProperty("magnet", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? Magnet { get; set; } + + [Newtonsoft.Json.JsonProperty("net_volume", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? Net_volume { get; set; } + + [Newtonsoft.Json.JsonProperty("net_weight", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? Net_weight { get; set; } + + } + + public partial class BaseBundleDefinitionModel + { + + [Newtonsoft.Json.JsonProperty("quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Quantity { get; set; } + + [Newtonsoft.Json.JsonProperty("variant_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Variant_id { get; set; } + + } + + /// + /// Standard Channel Metadata Record to store SellerSKU for a Sales Channel + /// + public partial class BaseChannelMetadataRequestModel : ChannelMetadataRequestModel + { + + } + + public partial class BaseCustomsModel + { + + [Newtonsoft.Json.JsonProperty("country_code_of_origin", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Country_code_of_origin { get; set; } + + [Newtonsoft.Json.JsonProperty("currency", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Currency { get; set; } + + [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Description { get; set; } + + [Newtonsoft.Json.JsonProperty("hs_tariff_code", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Hs_tariff_code { get; set; } + + [Newtonsoft.Json.JsonProperty("is321_eligible", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is321_eligible { get; set; } + + [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Value { get; set; } + + } + + public partial class BaseDimensionModel + { + + [Newtonsoft.Json.JsonProperty("height", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Height { get; set; } + + [Newtonsoft.Json.JsonProperty("length", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Length { get; set; } + + [Newtonsoft.Json.JsonProperty("width", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Width { get; set; } + + } + + public partial class BaseFulfillmentSettingsModel + { + + [Newtonsoft.Json.JsonProperty("dangerous_goods", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Dangerous_goods { get; set; } + + [Newtonsoft.Json.JsonProperty("is_bpm_parcel", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_bpm_parcel { get; set; } + + [Newtonsoft.Json.JsonProperty("is_case_pick", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_case_pick { get; set; } + + [Newtonsoft.Json.JsonProperty("msds_url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Msds_url { get; set; } + + [Newtonsoft.Json.JsonProperty("requires_prop65", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Requires_prop65 { get; set; } + + [Newtonsoft.Json.JsonProperty("serial_scan", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public BaseSerialScanModel Serial_scan { get; set; } + + } + + public partial class BaseLotInformationModel + { + + [Newtonsoft.Json.JsonProperty("is_lot", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_lot { get; set; } + + [Newtonsoft.Json.JsonProperty("minimum_shelf_life_days", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Minimum_shelf_life_days { get; set; } + + } + + public partial class BaseProductChannelMetadataModel : ProductChannelMetadataModel + { + + } + + public partial class BaseProductRequestModel + { + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("taxonomy_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Taxonomy_id { get; set; } + + [Newtonsoft.Json.JsonProperty("type_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Type_id { get; set; } + + } + + public partial class BaseProductVariantModel + { + + [Newtonsoft.Json.JsonProperty("additional_hazmat_attributes", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public BaseAdditionalHazmatAttributesModel Additional_hazmat_attributes { get; set; } + + [Newtonsoft.Json.JsonProperty("bundle_definition", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Bundle_definition { get; set; } + + [Newtonsoft.Json.JsonProperty("channel_metadata", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Channel_metadata { get; set; } + + [Newtonsoft.Json.JsonProperty("customs", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public BaseCustomsModel Customs { get; set; } + + [Newtonsoft.Json.JsonProperty("dimension", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public BaseDimensionModel Dimension { get; set; } + + [Newtonsoft.Json.JsonProperty("fulfillment_settings", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public BaseFulfillmentSettingsModel Fulfillment_settings { get; set; } + + [Newtonsoft.Json.JsonProperty("gtin", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Gtin { get; set; } + + [Newtonsoft.Json.JsonProperty("is_digital", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_digital { get; set; } + + [Newtonsoft.Json.JsonProperty("lot_information", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public BaseLotInformationModel Lot_information { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("packaging_material_type_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Packaging_material_type_id { get; set; } + + [Newtonsoft.Json.JsonProperty("packaging_requirement_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Packaging_requirement_id { get; set; } + + [Newtonsoft.Json.JsonProperty("return_preferences", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public BaseReturnPreferencesModel Return_preferences { get; set; } + + [Newtonsoft.Json.JsonProperty("reviews_pending", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Reviews_pending { get; set; } + + [Newtonsoft.Json.JsonProperty("sku", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Sku { get; set; } + + [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public VariantStatus Status { get; set; } + + [Newtonsoft.Json.JsonProperty("upc", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Upc { get; set; } + + [Newtonsoft.Json.JsonProperty("weight", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Weight { get; set; } + + } + + public partial class BaseProductVariantRequestModel + { + + [Newtonsoft.Json.JsonProperty("additional_hazmat_attributes", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public AdditionalHazmatAttributesRequestModel Additional_hazmat_attributes { get; set; } + + [Newtonsoft.Json.JsonProperty("bundle_definition", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Bundle_definition { get; set; } + + [Newtonsoft.Json.JsonProperty("channel_metadata", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Channel_metadata { get; set; } + + [Newtonsoft.Json.JsonProperty("customs", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public CustomsRequestModel Customs { get; set; } + + [Newtonsoft.Json.JsonProperty("dimension", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public DimensionRequestModel Dimension { get; set; } + + [Newtonsoft.Json.JsonProperty("fulfillment_settings", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public FulfillmentSettingsRequestModel Fulfillment_settings { get; set; } + + [Newtonsoft.Json.JsonProperty("gtin", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Gtin { get; set; } + + [Newtonsoft.Json.JsonProperty("is_digital", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_digital { get; set; } + + [Newtonsoft.Json.JsonProperty("lot_information", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public LotInformationRequestModel Lot_information { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("packaging_material_type_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Packaging_material_type_id { get; set; } + + [Newtonsoft.Json.JsonProperty("packaging_requirement_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Packaging_requirement_id { get; set; } + + [Newtonsoft.Json.JsonProperty("return_preferences", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ReturnPreferencesRequestModel Return_preferences { get; set; } + + [Newtonsoft.Json.JsonProperty("sku", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Sku { get; set; } + + [Newtonsoft.Json.JsonProperty("status_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Status_id { get; set; } + + [Newtonsoft.Json.JsonProperty("upc", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Upc { get; set; } + + [Newtonsoft.Json.JsonProperty("weight", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Weight { get; set; } + + } + + public partial class BaseReturnPreferencesModel + { + + [Newtonsoft.Json.JsonProperty("backup_action_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Backup_action_id { get; set; } + + [Newtonsoft.Json.JsonProperty("instructions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Instructions { get; set; } + + [Newtonsoft.Json.JsonProperty("primary_action_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Primary_action_id { get; set; } + + [Newtonsoft.Json.JsonProperty("return_to_sender_backup_action_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Return_to_sender_backup_action_id { get; set; } + + [Newtonsoft.Json.JsonProperty("return_to_sender_primary_action_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Return_to_sender_primary_action_id { get; set; } + + } + + public partial class BaseSerialScanModel + { + + [Newtonsoft.Json.JsonProperty("exact_character_length", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Exact_character_length { get; set; } + + [Newtonsoft.Json.JsonProperty("is_enabled", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_enabled { get; set; } + + [Newtonsoft.Json.JsonProperty("prefix", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Prefix { get; set; } + + [Newtonsoft.Json.JsonProperty("suffix", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Suffix { get; set; } + + } + + public partial class BaseTaxonomyViewModel + { + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Id { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("path", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Path { get; set; } + + } + + /// + /// BigCommerce Sales Channel Information with custom Amazon Fields + /// + public partial class BigCommerceChannelMetadataRequestModel : ChannelMetadataRequestModel + { + + [Newtonsoft.Json.JsonProperty("platform", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Platform { get; set; } + + [Newtonsoft.Json.JsonProperty("platform_product_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? Platform_product_id { get; set; } + + [Newtonsoft.Json.JsonProperty("platform_variant_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? Platform_variant_id { get; set; } + + } + + public partial class BigCommerceChannelMetadataViewModel : ChannelMetadataViewModel + { + + [Newtonsoft.Json.JsonProperty("platform_product_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? Platform_product_id { get; set; } + + [Newtonsoft.Json.JsonProperty("platform_variant_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? Platform_variant_id { get; set; } + + } + + public partial class BigCommerceProductChannelMetadataModel : BaseProductChannelMetadataModel + { + + [Newtonsoft.Json.JsonProperty("platform_product_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? Platform_product_id { get; set; } + + [Newtonsoft.Json.JsonProperty("platform_variant_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? Platform_variant_id { get; set; } + + } + + public partial class BundleDefinitionRequestModel + { + + [Newtonsoft.Json.JsonProperty("quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Quantity { get; set; } + + [Newtonsoft.Json.JsonProperty("variant_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Variant_id { get; set; } + + } + + public partial class BundleDefinitionViewModel + { + + [Newtonsoft.Json.JsonProperty("product_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Product_id { get; set; } + + [Newtonsoft.Json.JsonProperty("quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Quantity { get; set; } + + [Newtonsoft.Json.JsonProperty("variant_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Variant_id { get; set; } + + [Newtonsoft.Json.JsonProperty("variant_name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Variant_name { get; set; } + + [Newtonsoft.Json.JsonProperty("variant_sku", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Variant_sku { get; set; } + + } + + public partial class ChannelMetadataRequestModel + { + + [Newtonsoft.Json.JsonProperty("channel_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Channel_id { get; set; } + + [Newtonsoft.Json.JsonProperty("currency", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Currency { get; set; } + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? Id { get; set; } + + [Newtonsoft.Json.JsonProperty("is_inventory_sync_enabled", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_inventory_sync_enabled { get; set; } + + [Newtonsoft.Json.JsonProperty("legacy_product_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? Legacy_product_id { get; set; } + + [Newtonsoft.Json.JsonProperty("platform", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Platform { get; set; } + + [Newtonsoft.Json.JsonProperty("platform_identifier", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Platform_identifier { get; set; } + + [Newtonsoft.Json.JsonProperty("platform_inventory_item_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Platform_inventory_item_id { get; set; } + + [Newtonsoft.Json.JsonProperty("price", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Price { get; set; } + + [Newtonsoft.Json.JsonProperty("seller_sku", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Seller_sku { get; set; } + + } + + public partial class ChannelMetadataViewModel + { + + [Newtonsoft.Json.JsonProperty("channel_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Channel_id { get; set; } + + [Newtonsoft.Json.JsonProperty("channel_name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Channel_name { get; set; } + + [Newtonsoft.Json.JsonProperty("currency", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Currency { get; set; } + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Id { get; set; } + + [Newtonsoft.Json.JsonProperty("is_inventory_sync_enabled", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_inventory_sync_enabled { get; set; } + + [Newtonsoft.Json.JsonProperty("legacy_product_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? Legacy_product_id { get; set; } + + [Newtonsoft.Json.JsonProperty("platform", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Platform { get; set; } + + [Newtonsoft.Json.JsonProperty("platform_identifier", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Platform_identifier { get; set; } + + [Newtonsoft.Json.JsonProperty("platform_inventory_item_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Platform_inventory_item_id { get; set; } + + [Newtonsoft.Json.JsonProperty("price", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Price { get; set; } + + [Newtonsoft.Json.JsonProperty("seller_sku", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Seller_sku { get; set; } + + } + + public partial class ChildTaxonomyViewModel : BaseTaxonomyViewModel + { + + [Newtonsoft.Json.JsonProperty("has_children", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Has_children { get; set; } + + } + + public partial class ComplianceViewModel + { + + [Newtonsoft.Json.JsonProperty("category", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Category { get; set; } + + [Newtonsoft.Json.JsonProperty("reasons", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Reasons { get; set; } + + [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Status { get; set; } + + } + + public partial class ConvertVariantToBundleRequest + { + + [Newtonsoft.Json.JsonProperty("bundle_definition", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Bundle_definition { get; set; } + + [Newtonsoft.Json.JsonProperty("channel_metadata", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Channel_metadata { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("sku", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Sku { get; set; } + + } + + public partial class CreateProductRequestModelV5 : BaseProductRequestModel + { + + [Newtonsoft.Json.JsonProperty("is_quarantine", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_quarantine { get; set; } + + [Newtonsoft.Json.JsonProperty("variants", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Variants { get; set; } + + } + + public partial class CreateProductVariantRequestModelV5 : BaseProductVariantRequestModel + { + + [Newtonsoft.Json.JsonProperty("barcodes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Barcodes { get; set; } + + } + + public partial class CreateProductVariantRequestModelV5Array : System.Collections.ObjectModel.Collection + { + + } + + public partial class CustomsRequestModel + { + + [Newtonsoft.Json.JsonProperty("country_code_of_origin", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Country_code_of_origin { get; set; } + + [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Description { get; set; } + + [Newtonsoft.Json.JsonProperty("hs_tariff_code", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Hs_tariff_code { get; set; } + + [Newtonsoft.Json.JsonProperty("is321_eligible", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is321_eligible { get; set; } + + [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Value { get; set; } + + } + + public partial class CustomsViewModel + { + + [Newtonsoft.Json.JsonProperty("country_code_of_origin", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Country_code_of_origin { get; set; } + + [Newtonsoft.Json.JsonProperty("currency", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Currency { get; set; } + + [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Description { get; set; } + + [Newtonsoft.Json.JsonProperty("hs_tariff_code", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Hs_tariff_code { get; set; } + + [Newtonsoft.Json.JsonProperty("is321_eligible", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is321_eligible { get; set; } + + [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Value { get; set; } + + } + + public partial class Object33 : System.Collections.Generic.Dictionary> + { + + } + + public partial class HttpValidationProblemDetails + { + + [Newtonsoft.Json.JsonProperty("detail", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Detail { get; set; } + + [Newtonsoft.Json.JsonProperty("instance", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Instance { get; set; } + + [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Status { get; set; } + + [Newtonsoft.Json.JsonProperty("title", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Title { get; set; } + + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Type { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Object34 : System.Collections.Generic.Dictionary> + { + + } + + public partial class VariantInternalViewModelV5 : VariantViewModelBase + { + + [Newtonsoft.Json.JsonProperty("barcodes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Barcodes { get; set; } + + [Newtonsoft.Json.JsonProperty("channel_metadata", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Channel_metadata { get; set; } + + } + + public partial class DimensionRequestModel + { + + [Newtonsoft.Json.JsonProperty("height", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Height { get; set; } + + [Newtonsoft.Json.JsonProperty("length", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Length { get; set; } + + [Newtonsoft.Json.JsonProperty("width", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Width { get; set; } + + } + + public partial class DimensionViewModel + { + + [Newtonsoft.Json.JsonProperty("height", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Height { get; set; } + + [Newtonsoft.Json.JsonProperty("is_locked", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_locked { get; set; } + + [Newtonsoft.Json.JsonProperty("length", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Length { get; set; } + + [Newtonsoft.Json.JsonProperty("source", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Source { get; set; } + + [Newtonsoft.Json.JsonProperty("unit", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Unit { get; set; } + + [Newtonsoft.Json.JsonProperty("width", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Width { get; set; } + + } + + public partial class EnumViewModel + { + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Id { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + } + + public partial class FulfillmentSettingsRequestModel + { + + [Newtonsoft.Json.JsonProperty("dangerous_goods", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Dangerous_goods { get; set; } + + [Newtonsoft.Json.JsonProperty("is_bpm_parcel", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_bpm_parcel { get; set; } + + [Newtonsoft.Json.JsonProperty("is_case_pick", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_case_pick { get; set; } + + [Newtonsoft.Json.JsonProperty("msds_url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Msds_url { get; set; } + + [Newtonsoft.Json.JsonProperty("requires_prop65", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Requires_prop65 { get; set; } + + [Newtonsoft.Json.JsonProperty("serial_scan", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SerialScanRequestModel Serial_scan { get; set; } + + } + + public partial class FulfillmentSettingsViewModel + { + + [Newtonsoft.Json.JsonProperty("dangerous_goods", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Dangerous_goods { get; set; } + + [Newtonsoft.Json.JsonProperty("is_bpm_parcel", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_bpm_parcel { get; set; } + + [Newtonsoft.Json.JsonProperty("is_case_pick", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_case_pick { get; set; } + + [Newtonsoft.Json.JsonProperty("msds_url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Msds_url { get; set; } + + [Newtonsoft.Json.JsonProperty("requires_prop65", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Requires_prop65 { get; set; } + + [Newtonsoft.Json.JsonProperty("serial_scan", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SerialScanViewModel Serial_scan { get; set; } + + } + + public partial class Object35 : System.Collections.Generic.Dictionary> + { + + } + + /// + /// Barcode Associated with variant + /// + public partial class Int + { + + } + + /// + /// Barcodes Associated with variant + /// + public partial class String + { + + } + + /// + /// List of Category Ids associated with product + /// + public partial class Int2 + { + + } + + /// + /// Looks for Products variants by their channel IDs + /// + public partial class Int3 + { + + } + + /// + /// Looks for Products with/without digital variants + /// + public partial class Boolean + { + + } + + /// + /// Looks for Products with/without variants + /// + public partial class Boolean2 + { + + } + + /// + /// Looks for variants by its associated inventory id + /// + public partial class Int4 + { + + } + + /// + /// Looks for Products that have been updated since the given date + /// + public partial class DateTime + { + + } + + /// + /// Looks for Products with by Legacy Product Id(s) + /// + public partial class Int5 + { + + } + + /// + /// Looks for Products/Variants by name + /// + public partial class String2 + { + + } + + /// + /// Looks for Products with inventory + /// + public partial class Integer + { + + } + + public partial class Int6 + { + + } + + /// + /// Looks for Products variants by their external Platform IDs + /// + public partial class String3 + { + + } + + public partial class Object36 : System.Collections.Generic.Dictionary> + { + + } + + /// + /// Looks for Products with an assigned Id + /// + public partial class Int7 + { + + } + + public partial class Object37 : System.Collections.Generic.Dictionary> + { + + } + + public partial class OneOfArray4 : System.Collections.ObjectModel.Collection + { + + } + + /// + /// Looks for Products by type + /// + public partial class Integer2 + { + + } + + /// + /// Looks for Products by ReviewsPending + /// + public partial class ReviewsPendingType + { + + } + + /// + /// Looks for Products that match the provided Sku query + /// + public partial class String4 + { + + } + + /// + /// Looks for Products variants assigned to a platform/sales channel + /// + public partial class String5 + { + + } + + /// + /// Looks for Products that match the provided Seller query + /// + public partial class String6 + { + + } + + /// + /// Looks for Products variants by their taxonomy id or any descendants of the taxonomies sent separated by comma + /// + public partial class Int8 + { + + } + + /// + /// Looks for products that contain a variant with the given ID + /// + public partial class Int9 + { + + } + + /// + /// Looks for Products with variants that contain provided status + /// + public partial class String7 + { + + } + + public partial class HttpValidationProblemDetails2 : HttpValidationProblemDetails + { + + [Newtonsoft.Json.JsonProperty("errors", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.IDictionary> Errors { get; set; } + + } + + public partial class InventoryViewModel2 + { + + [Newtonsoft.Json.JsonProperty("inventory_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Inventory_id { get; set; } + + [Newtonsoft.Json.JsonProperty("on_hand_qty", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int On_hand_qty { get; set; } + + } + + public partial class LotInformationRequestModel + { + + [Newtonsoft.Json.JsonProperty("is_lot", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_lot { get; set; } + + [Newtonsoft.Json.JsonProperty("minimum_shelf_life_days", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Minimum_shelf_life_days { get; set; } + + } + + public partial class LotInformationViewModel + { + + [Newtonsoft.Json.JsonProperty("is_lot", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_lot { get; set; } + + [Newtonsoft.Json.JsonProperty("minimum_shelf_life_days", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Minimum_shelf_life_days { get; set; } + + } + + public partial class MergeVariantRequestModel + { + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Id { get; set; } + + } + + public partial class MergeVariantRequestModelArray : System.Collections.ObjectModel.Collection + { + + } + + public partial class MergedChildrenViewModel + { + + [Newtonsoft.Json.JsonProperty("channel_ids", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Channel_ids { get; set; } + + [Newtonsoft.Json.JsonProperty("completed_at", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset Completed_at { get; set; } + + [Newtonsoft.Json.JsonProperty("inventory_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? Inventory_id { get; set; } + + [Newtonsoft.Json.JsonProperty("variant_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Variant_id { get; set; } + + [Newtonsoft.Json.JsonProperty("variant_name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Variant_name { get; set; } + + } + + public partial class MigrateVariantRequestModel + { + + [Newtonsoft.Json.JsonProperty("category_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Category_id { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("product_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Product_id { get; set; } + + [Newtonsoft.Json.JsonProperty("sub_category_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Sub_category_id { get; set; } + + [Newtonsoft.Json.JsonProperty("taxonomy_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Taxonomy_id { get; set; } + + [Newtonsoft.Json.JsonProperty("variants", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Variants { get; set; } + + } + + public partial class PackagingMaterialTypeViewModel + { + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Id { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + } + + public partial class PackagingRequirementViewModel + { + + [Newtonsoft.Json.JsonProperty("applicable_categories", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Applicable_categories { get; set; } + + [Newtonsoft.Json.JsonProperty("applicable_packaging_material_types", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Applicable_packaging_material_types { get; set; } + + [Newtonsoft.Json.JsonProperty("applicable_taxonomy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Applicable_taxonomy { get; set; } + + [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Description { get; set; } + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Id { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + } + + public partial class PackagingRequirementViewModelArray : System.Collections.ObjectModel.Collection + { + + } + + public partial class OneOfArray5 : System.Collections.ObjectModel.Collection + { + + } + + public partial class Object38 : System.Collections.Generic.Dictionary> + { + + } + + public partial class Object39 : System.Collections.Generic.Dictionary> + { + + } + + public partial class ProductChannelMetadataModel + { + + [Newtonsoft.Json.JsonProperty("channel_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Channel_id { get; set; } + + [Newtonsoft.Json.JsonProperty("channel_name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Channel_name { get; set; } + + [Newtonsoft.Json.JsonProperty("currency", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Currency { get; set; } + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? Id { get; set; } + + [Newtonsoft.Json.JsonProperty("is_inventory_sync_enabled", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_inventory_sync_enabled { get; set; } + + [Newtonsoft.Json.JsonProperty("legacy_product_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? Legacy_product_id { get; set; } + + [Newtonsoft.Json.JsonProperty("platform", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Platform { get; set; } + + [Newtonsoft.Json.JsonProperty("platform_identifier", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Platform_identifier { get; set; } + + [Newtonsoft.Json.JsonProperty("platform_inventory_item_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Platform_inventory_item_id { get; set; } + + [Newtonsoft.Json.JsonProperty("price", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Price { get; set; } + + [Newtonsoft.Json.JsonProperty("seller_sku", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Seller_sku { get; set; } + + } + + public partial class ProductViewModel + { + + [Newtonsoft.Json.JsonProperty("category", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public EnumViewModel Category { get; set; } + + [Newtonsoft.Json.JsonProperty("created_on", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset Created_on { get; set; } + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Id { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("sub_category", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public EnumViewModel Sub_category { get; set; } + + [Newtonsoft.Json.JsonProperty("taxonomy", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public TaxonomyInformationViewModel Taxonomy { get; set; } + + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Type { get; set; } + + [Newtonsoft.Json.JsonProperty("updated_on", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Updated_on { get; set; } + + [Newtonsoft.Json.JsonProperty("user_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long User_id { get; set; } + + [Newtonsoft.Json.JsonProperty("variants", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Variants { get; set; } + + } + + public partial class ProductViewModelV5 + { + + [Newtonsoft.Json.JsonProperty("created_on", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset Created_on { get; set; } + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Id { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("taxonomy", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public TaxonomyInformationViewModel Taxonomy { get; set; } + + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Type { get; set; } + + [Newtonsoft.Json.JsonProperty("updated_on", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Updated_on { get; set; } + + [Newtonsoft.Json.JsonProperty("user_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long User_id { get; set; } + + [Newtonsoft.Json.JsonProperty("variants", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Variants { get; set; } + + } + + public partial class ProductViewModelV5PagedResponse + { + + [Newtonsoft.Json.JsonProperty("first", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string First { get; set; } + + [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Items { get; set; } + + [Newtonsoft.Json.JsonProperty("last", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Last { get; set; } + + [Newtonsoft.Json.JsonProperty("next", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Next { get; set; } + + [Newtonsoft.Json.JsonProperty("prev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Prev { get; set; } + + } + + public partial class Object40 : System.Collections.Generic.Dictionary> + { + + } + + public partial class ReturnPreferencesRequestModel + { + + [Newtonsoft.Json.JsonProperty("backup_action_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Backup_action_id { get; set; } + + [Newtonsoft.Json.JsonProperty("instructions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Instructions { get; set; } + + [Newtonsoft.Json.JsonProperty("primary_action_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Primary_action_id { get; set; } + + [Newtonsoft.Json.JsonProperty("return_to_sender_backup_action_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Return_to_sender_backup_action_id { get; set; } + + [Newtonsoft.Json.JsonProperty("return_to_sender_primary_action_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Return_to_sender_primary_action_id { get; set; } + + } + + public partial class ReturnPreferencesViewModel + { + + [Newtonsoft.Json.JsonProperty("backup_action", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public EnumViewModel Backup_action { get; set; } + + [Newtonsoft.Json.JsonProperty("instructions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Instructions { get; set; } + + [Newtonsoft.Json.JsonProperty("primary_action", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public EnumViewModel Primary_action { get; set; } + + [Newtonsoft.Json.JsonProperty("return_to_sender_backup_action", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public EnumViewModel Return_to_sender_backup_action { get; set; } + + [Newtonsoft.Json.JsonProperty("return_to_sender_primary_action", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public EnumViewModel Return_to_sender_primary_action { get; set; } + + } + + public enum ReviewsPendingType2 + { + + _0 = 0, + + _1 = 1, + + _2 = 2, + + _3 = 3, + + _4 = 4, + + } + + public partial class SerialScanRequestModel + { + + [Newtonsoft.Json.JsonProperty("exact_character_length", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Exact_character_length { get; set; } + + [Newtonsoft.Json.JsonProperty("is_enabled", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_enabled { get; set; } + + [Newtonsoft.Json.JsonProperty("prefix", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Prefix { get; set; } + + [Newtonsoft.Json.JsonProperty("suffix", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Suffix { get; set; } + + } + + public partial class SerialScanViewModel + { + + [Newtonsoft.Json.JsonProperty("exact_character_length", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Exact_character_length { get; set; } + + [Newtonsoft.Json.JsonProperty("is_enabled", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_enabled { get; set; } + + [Newtonsoft.Json.JsonProperty("prefix", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Prefix { get; set; } + + [Newtonsoft.Json.JsonProperty("suffix", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Suffix { get; set; } + + } + + /// + /// Shopify Sales Channel Information + /// + public partial class ShopifyChannelMetadataRequestModel : BaseChannelMetadataRequestModel + { + + [Newtonsoft.Json.JsonProperty("platform", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Platform { get; set; } + + } + + public partial class ShopifyChannelMetadataViewModel : ChannelMetadataViewModel + { + + } + + public partial class ShopifyProductChannelMetadataModel : BaseProductChannelMetadataModel + { + + } + + public partial class TaxonomyInformationViewModel + { + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Id { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("parent_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Parent_id { get; set; } + + [Newtonsoft.Json.JsonProperty("parent_name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Parent_name { get; set; } + + [Newtonsoft.Json.JsonProperty("path", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Path { get; set; } + + } + + public partial class TaxonomyViewModel : BaseTaxonomyViewModel + { + + [Newtonsoft.Json.JsonProperty("children", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Children { get; set; } + + [Newtonsoft.Json.JsonProperty("parent", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public BaseTaxonomyViewModel Parent { get; set; } + + } + + public partial class TaxonomyViewModelArray : System.Collections.ObjectModel.Collection + { + + } + + public partial class UpdateProductRequestModelV5 : BaseProductRequestModel + { + + /// + /// Unique reference ID for the product + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Id { get; set; } + + [Newtonsoft.Json.JsonProperty("variants", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Variants { get; set; } + + } + + public partial class UpdateProductVariantModelV5 : BaseProductVariantModel + { + + [Newtonsoft.Json.JsonProperty("barcodes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Barcodes { get; set; } + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Id { get; set; } + + } + + public partial class UpdateProductVariantRequestModelV5 : BaseProductVariantRequestModel + { + + [Newtonsoft.Json.JsonProperty("barcodes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Barcodes { get; set; } + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Id { get; set; } + + } + + public partial class VariantInternalViewModel : VariantViewModel + { + + [Newtonsoft.Json.JsonProperty("compliance", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ComplianceViewModel Compliance { get; set; } + + } + + public partial class VariantInternalViewModelV52 : VariantInternalViewModelV5 + { + + [Newtonsoft.Json.JsonProperty("compliance", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ComplianceViewModel Compliance { get; set; } + + } + + public enum VariantStatus + { + + _1 = 1, + + _2 = 2, + + _3 = 3, + + } + + public partial class VariantToMigrate + { + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Id { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + } + + public partial class VariantViewModel : VariantViewModelBase + { + + [Newtonsoft.Json.JsonProperty("barcode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Barcode { get; set; } + + [Newtonsoft.Json.JsonProperty("barcode_sticker_url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Barcode_sticker_url { get; set; } + + [Newtonsoft.Json.JsonProperty("channel_metadata", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Channel_metadata { get; set; } + + } + + public partial class VariantViewModelBase + { + + [Newtonsoft.Json.JsonProperty("additional_hazmat_attributes", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public AdditionalHazmatAttributesViewModel Additional_hazmat_attributes { get; set; } + + [Newtonsoft.Json.JsonProperty("associated_bundles", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Associated_bundles { get; set; } + + [Newtonsoft.Json.JsonProperty("bundle_definition", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Bundle_definition { get; set; } + + [Newtonsoft.Json.JsonProperty("created_on", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset Created_on { get; set; } + + [Newtonsoft.Json.JsonProperty("customs", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public CustomsViewModel Customs { get; set; } + + [Newtonsoft.Json.JsonProperty("dimension", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public DimensionViewModel Dimension { get; set; } + + [Newtonsoft.Json.JsonProperty("fulfillment_settings", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public FulfillmentSettingsViewModel Fulfillment_settings { get; set; } + + [Newtonsoft.Json.JsonProperty("gtin", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Gtin { get; set; } + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Id { get; set; } + + [Newtonsoft.Json.JsonProperty("inventory", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public InventoryViewModel2 Inventory { get; set; } + + [Newtonsoft.Json.JsonProperty("is_digital", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_digital { get; set; } + + [Newtonsoft.Json.JsonProperty("is_image_uploaded", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_image_uploaded { get; set; } + + [Newtonsoft.Json.JsonProperty("lot_information", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public LotInformationViewModel Lot_information { get; set; } + + [Newtonsoft.Json.JsonProperty("merge_children", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Merge_children { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("packaging_material_type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public EnumViewModel Packaging_material_type { get; set; } + + [Newtonsoft.Json.JsonProperty("packaging_requirement", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public EnumViewModel Packaging_requirement { get; set; } + + [Newtonsoft.Json.JsonProperty("return_preferences", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ReturnPreferencesViewModel Return_preferences { get; set; } + + [Newtonsoft.Json.JsonProperty("reviews_pending", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Reviews_pending { get; set; } + + [Newtonsoft.Json.JsonProperty("sku", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Sku { get; set; } + + [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Status { get; set; } + + [Newtonsoft.Json.JsonProperty("upc", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Upc { get; set; } + + [Newtonsoft.Json.JsonProperty("updated_on", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Updated_on { get; set; } + + [Newtonsoft.Json.JsonProperty("weight", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public WeightViewModel Weight { get; set; } + + } + + public partial class VariantViewModelV5Array : System.Collections.ObjectModel.Collection + { + + } + + public partial class WeightViewModel + { + + [Newtonsoft.Json.JsonProperty("unit", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Unit { get; set; } + + [Newtonsoft.Json.JsonProperty("weight", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Weight { get; set; } + + } + + /// + /// Information about an inventory item contained inside a receiving order box + /// + public partial class AddBoxItemToBoxModel + { + + /// + /// Unique inventory id of the items in the box + /// + [Newtonsoft.Json.JsonProperty("inventory_id", Required = Newtonsoft.Json.Required.Always)] + public int Inventory_id { get; set; } + + /// + /// Lot expiration date for the items in the box + /// + [Newtonsoft.Json.JsonProperty("lot_date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Lot_date { get; set; } + + /// + /// Lot number of the items in the box + /// + [Newtonsoft.Json.JsonProperty("lot_number", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Lot_number { get; set; } + + /// + /// Quantity of the items in the box + /// + [Newtonsoft.Json.JsonProperty("quantity", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Range(1, 2147483647)] + public int Quantity { get; set; } + + } + + /// + /// Information about a box shipment to be added to a receiving order + /// + public partial class AddBoxToOrderModel + { + + /// + /// Items contained in this box + /// + [Newtonsoft.Json.JsonProperty("box_items", Required = Newtonsoft.Json.Required.AllowNull)] + public System.Collections.Generic.ICollection Box_items { get; set; } + + /// + /// Tracking number for the box shipment + /// + [Newtonsoft.Json.JsonProperty("tracking_number", Required = Newtonsoft.Json.Required.AllowNull)] + public string Tracking_number { get; set; } + + } + + /// + /// Model containing information that assigns a receiving order to a fulfillment center. + ///
If the fulfillment center provided is in a receiving hub region, then the response will be the receiving hub location. + ///
+ public partial class AssignOrderToFulfillmentCenterModel + { + + /// + /// ID of the fulfillment center to assign this receiving order to + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Always)] + public int Id { get; set; } + + } + + /// + /// Information about an item contained inside a box as part of a receiving order + /// + public partial class BoxItemViewModel + { + + /// + /// Unique identifier of the inventory item + /// + [Newtonsoft.Json.JsonProperty("inventory_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Inventory_id { get; set; } + + /// + /// Expiration date of the item's lot + /// + [Newtonsoft.Json.JsonProperty("lot_date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Lot_date { get; set; } + + /// + /// Lot number the item belongs to + /// + [Newtonsoft.Json.JsonProperty("lot_number", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Lot_number { get; set; } + + /// + /// Quantity of the item included + /// + [Newtonsoft.Json.JsonProperty("quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Quantity { get; set; } + + /// + /// Quantity of the item that was received after processing the receiving order + /// + [Newtonsoft.Json.JsonProperty("received_quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Received_quantity { get; set; } + + /// + /// Quantity of the item that has been stowed + /// + [Newtonsoft.Json.JsonProperty("stowed_quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Stowed_quantity { get; set; } + + } + + public enum BoxStatus + { + + [System.Runtime.Serialization.EnumMember(Value = @"Awaiting")] + Awaiting = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"Arrived")] + Arrived = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"Completed")] + Completed = 2, + + [System.Runtime.Serialization.EnumMember(Value = @"Counting")] + Counting = 3, + + [System.Runtime.Serialization.EnumMember(Value = @"Stowing")] + Stowing = 4, + + [System.Runtime.Serialization.EnumMember(Value = @"Cancelled")] + Cancelled = 5, + + [System.Runtime.Serialization.EnumMember(Value = @"InternalTransfer")] + InternalTransfer = 6, + + } + + /// + /// Information about a box shipment included in a receiving order + /// + public partial class BoxViewModel + { + + /// + /// Date the box arrived + /// + [Newtonsoft.Json.JsonProperty("arrived_date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Arrived_date { get; set; } + + [Newtonsoft.Json.JsonProperty("box_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Box_id { get; set; } + + /// + /// Information about the items included in the box + /// + [Newtonsoft.Json.JsonProperty("box_items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Box_items { get; set; } + + /// + /// The number of the box in the receiving order + /// + [Newtonsoft.Json.JsonProperty("box_number", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Box_number { get; set; } + + [Newtonsoft.Json.JsonProperty("box_status", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public BoxStatus Box_status { get; set; } + + /// + /// Date counting of the box's inventory items started + /// + [Newtonsoft.Json.JsonProperty("counting_started_date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Counting_started_date { get; set; } + + /// + /// Date the box was received + /// + [Newtonsoft.Json.JsonProperty("received_date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Received_date { get; set; } + + /// + /// Tracking number of the box shipment + /// + [Newtonsoft.Json.JsonProperty("tracking_number", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Tracking_number { get; set; } + + } + + public partial class BoxViewModelArray : System.Collections.ObjectModel.Collection + { + + } + + /// + /// Information to create a new receiving order + /// + public partial class CreateReceivingOrderModel + { + + [Newtonsoft.Json.JsonProperty("box_packaging_type", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public PackingType Box_packaging_type { get; set; } + + /// + /// Box shipments to be added to this receiving order + /// + [Newtonsoft.Json.JsonProperty("boxes", Required = Newtonsoft.Json.Required.AllowNull)] + public System.Collections.Generic.ICollection Boxes { get; set; } + + /// + /// Expected arrival date of all the box shipments in this receiving order + /// + [Newtonsoft.Json.JsonProperty("expected_arrival_date", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public System.DateTimeOffset Expected_arrival_date { get; set; } + + [Newtonsoft.Json.JsonProperty("fulfillment_center", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public AssignOrderToFulfillmentCenterModel Fulfillment_center { get; set; } = new AssignOrderToFulfillmentCenterModel(); + + [Newtonsoft.Json.JsonProperty("package_type", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public PackageType Package_type { get; set; } + + /// + /// Purchase order number for this receiving order + /// + [Newtonsoft.Json.JsonProperty("purchase_order_number", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Purchase_order_number { get; set; } + + } + + /// + /// Information about a fulfillment center + /// + public partial class FulfillmentCenterViewModel2 + { + + /// + /// Address line one of the fulfillment center + /// + [Newtonsoft.Json.JsonProperty("address1", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Address1 { get; set; } + + /// + /// Address line two of the fulfillment center + /// + [Newtonsoft.Json.JsonProperty("address2", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Address2 { get; set; } + + /// + /// City the fulfillment center is located in + /// + [Newtonsoft.Json.JsonProperty("city", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string City { get; set; } + + /// + /// Country the fulfillment center is located in + /// + [Newtonsoft.Json.JsonProperty("country", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Country { get; set; } + + /// + /// Email contact for the fulfillment center + /// + [Newtonsoft.Json.JsonProperty("email", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Email { get; set; } + + /// + /// Unique identifier of the fulfillment center + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Id { get; set; } + + /// + /// Name of the fulfillment center + /// + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// Phone number contact for the fulfillment center + /// + [Newtonsoft.Json.JsonProperty("phone_number", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Phone_number { get; set; } + + /// + /// State the fulfillment center is located in + /// + [Newtonsoft.Json.JsonProperty("state", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string State { get; set; } + + /// + /// Timezone the fulfillment center is located in + /// + [Newtonsoft.Json.JsonProperty("timezone", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Timezone { get; set; } + + /// + /// Postal code of the fulfillment center + /// + [Newtonsoft.Json.JsonProperty("zip_code", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Zip_code { get; set; } + + } + + public partial class FulfillmentCenterViewModelArray : System.Collections.ObjectModel.Collection + { + + } + + public partial class IntegerArray6 : System.Collections.ObjectModel.Collection + { + + } + + public partial class IntegerArray7 : System.Collections.ObjectModel.Collection + { + + } + + public partial class ValidationProblemDetails + { + + [Newtonsoft.Json.JsonProperty("detail", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Detail { get; set; } + + [Newtonsoft.Json.JsonProperty("errors", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.IDictionary> Errors { get; set; } + + [Newtonsoft.Json.JsonProperty("instance", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Instance { get; set; } + + [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Status { get; set; } + + [Newtonsoft.Json.JsonProperty("title", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Title { get; set; } + + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Type { get; set; } + + private System.Collections.Generic.IDictionary _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); } + set { _additionalProperties = value; } + } + + } + + public partial class Int10 + { + + } + + public partial class Int11 + { + + } + + public partial class Int12 + { + + } + + public partial class Int13 + { + + } + + public partial class StringArray3 : System.Collections.ObjectModel.Collection + { + + } + + public enum PackageType + { + + [System.Runtime.Serialization.EnumMember(Value = @"Package")] + Package = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"Pallet")] + Pallet = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"FloorLoadedContainer")] + FloorLoadedContainer = 2, + + } + + public enum PackingType + { + + [System.Runtime.Serialization.EnumMember(Value = @"EverythingInOneBox")] + EverythingInOneBox = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"OneSkuPerBox")] + OneSkuPerBox = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"MultipleSkuPerBox")] + MultipleSkuPerBox = 2, + + } + + public partial class Object41 : System.Collections.Generic.Dictionary> + { + + } + + public partial class Object42 : System.Collections.Generic.Dictionary> + { + + } + + public partial class Object43 : System.Collections.Generic.Dictionary> + { + + } + + public enum ReceivingStatus + { + + [System.Runtime.Serialization.EnumMember(Value = @"Awaiting")] + Awaiting = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"Processing")] + Processing = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"Completed")] + Completed = 2, + + [System.Runtime.Serialization.EnumMember(Value = @"Cancelled")] + Cancelled = 3, + + [System.Runtime.Serialization.EnumMember(Value = @"Incomplete")] + Incomplete = 4, + + [System.Runtime.Serialization.EnumMember(Value = @"Arrived")] + Arrived = 5, + + [System.Runtime.Serialization.EnumMember(Value = @"PartiallyArrived")] + PartiallyArrived = 6, + + [System.Runtime.Serialization.EnumMember(Value = @"PartiallyArrivedAtHub")] + PartiallyArrivedAtHub = 7, + + [System.Runtime.Serialization.EnumMember(Value = @"ArrivedAtHub")] + ArrivedAtHub = 8, + + [System.Runtime.Serialization.EnumMember(Value = @"ProcessingAtHub")] + ProcessingAtHub = 9, + + [System.Runtime.Serialization.EnumMember(Value = @"InternalTransfer")] + InternalTransfer = 10, + + } + + public partial class ReceivingStatusArray : System.Collections.ObjectModel.Collection + { + + } + + public partial class UpdateExternalSyncModel + { + + [Newtonsoft.Json.JsonProperty("ids", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Ids { get; set; } + + [Newtonsoft.Json.JsonProperty("is_external_sync", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Is_external_sync { get; set; } + + } + + public partial class InventoryQuantityViewModel + { + + /// + /// Quantity of the inventory item submitted in the WRO + /// + [Newtonsoft.Json.JsonProperty("expected_quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Expected_quantity { get; set; } + + /// + /// ID of the inventory item + /// + [Newtonsoft.Json.JsonProperty("inventory_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Inventory_id { get; set; } + + /// + /// Quantity of the inventory item received by the warehouse + /// + [Newtonsoft.Json.JsonProperty("received_quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Received_quantity { get; set; } + + /// + /// Sku of the inventory item + /// + [Newtonsoft.Json.JsonProperty("sku", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Sku { get; set; } + + /// + /// Quantity of the inventory item stowed by the warehouse + /// + [Newtonsoft.Json.JsonProperty("stowed_quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Stowed_quantity { get; set; } + + } + + /// + /// View model for receiving order status history + /// + public partial class ReceivingOrderStatusHistoryViewModel + { + + /// + /// Unique id of the status + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Id { get; set; } + + /// + /// Name of the status + /// + [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Status { get; set; } + + /// + /// Timestamp when the status was recorded + /// + [Newtonsoft.Json.JsonProperty("timestamp", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset Timestamp { get; set; } + + } + + public partial class WarehouseReceivingOrderViewModel + { + + /// + /// URL to the packing slip to be included in each box shipment for this receiving order + /// + [Newtonsoft.Json.JsonProperty("box_labels_uri", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Box_labels_uri { get; set; } + + [Newtonsoft.Json.JsonProperty("box_packaging_type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public PackingType Box_packaging_type { get; set; } + + /// + /// Expected date that all packages will have arrived + /// + [Newtonsoft.Json.JsonProperty("expected_arrival_date", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset Expected_arrival_date { get; set; } + + /// + /// The timestamp in UTC when a 3rd party integrator has set in our system + /// + [Newtonsoft.Json.JsonProperty("external_sync_timestamp", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? External_sync_timestamp { get; set; } + + [Newtonsoft.Json.JsonProperty("fulfillment_center", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public FulfillmentCenterViewModel2 Fulfillment_center { get; set; } + + /// + /// Unique id of the warehouse receiving order + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Id { get; set; } + + /// + /// Insert date of the receiving order + /// + [Newtonsoft.Json.JsonProperty("insert_date", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset Insert_date { get; set; } + + /// + /// Inventory items and quantities within the WRO + /// + [Newtonsoft.Json.JsonProperty("inventory_quantities", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Inventory_quantities { get; set; } + + /// + /// Last date the receiving order was updated + /// + [Newtonsoft.Json.JsonProperty("last_updated_date", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset Last_updated_date { get; set; } + + [Newtonsoft.Json.JsonProperty("package_type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public PackageType Package_type { get; set; } + + /// + /// Purchase order number for a receiving order + /// + [Newtonsoft.Json.JsonProperty("purchase_order_number", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Purchase_order_number { get; set; } + + [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public ReceivingStatus Status { get; set; } + + /// + /// The history of status changes for this receiving order + /// + [Newtonsoft.Json.JsonProperty("status_history", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Status_history { get; set; } + + } + + public partial class WarehouseReceivingOrderViewModelArray : System.Collections.ObjectModel.Collection + { + + } + + /// + /// Created by channel metadata + /// + public partial class ChannelInfoViewModel2 + { + + /// + /// Unique id of the channel + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Id { get; set; } + + /// + /// Name of the channel + /// + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + } + + public partial class CreateReturnRequest + { + + [Newtonsoft.Json.JsonProperty("fulfillmentCenter", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Facility FulfillmentCenter { get; set; } + + [Newtonsoft.Json.JsonProperty("inventory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Inventory { get; set; } + + [Newtonsoft.Json.JsonProperty("original_shipment_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Original_shipment_id { get; set; } + + [Newtonsoft.Json.JsonProperty("reference_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reference_id { get; set; } + + [Newtonsoft.Json.JsonProperty("tracking_number", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Tracking_number { get; set; } + + } + + public partial class CreateReturnViewModel + { + + [Newtonsoft.Json.JsonProperty("fulfillment_center", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public FulfillmentCenterViewModel3 Fulfillment_center { get; set; } = new FulfillmentCenterViewModel3(); + + /// + /// Array of inventory items being returned + /// + [Newtonsoft.Json.JsonProperty("inventory", Required = Newtonsoft.Json.Required.AllowNull)] + public System.Collections.Generic.ICollection Inventory { get; set; } + + /// + /// Shipment from which the items in the return originated + /// + [Newtonsoft.Json.JsonProperty("original_shipment_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Original_shipment_id { get; set; } + + /// + /// Client-defined external unique identifier for the return order + /// + [Newtonsoft.Json.JsonProperty("reference_id", Required = Newtonsoft.Json.Required.AllowNull)] + [System.ComponentModel.DataAnnotations.StringLength(50)] + public string Reference_id { get; set; } + + /// + /// Tracking number for the return shipment + /// + [Newtonsoft.Json.JsonProperty("tracking_number", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(500)] + public string Tracking_number { get; set; } + + } + + public partial class Facility + { + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Id { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + } + + /// + /// Information about a fulfillment center + /// + public partial class FulfillmentCenterViewModel3 + { + + /// + /// Unique identifier of the fulfillment center + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Always)] + public int Id { get; set; } + + /// + /// Name of the fulfillment center + /// + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + } + + public partial class InventoryItemViewModel + { + + [Newtonsoft.Json.JsonProperty("action_requested", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ReturnActionRequestedViewModel Action_requested { get; set; } + + /// + /// Action(s) taken when processing the return + /// + [Newtonsoft.Json.JsonProperty("action_taken", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Action_taken { get; set; } + + /// + /// Unique id of the inventory item + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Id { get; set; } + + /// + /// Name of the inventory item + /// + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// Quantity expected to be processed with the return + /// + [Newtonsoft.Json.JsonProperty("quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Quantity { get; set; } + + } + + public partial class LotInformationViewModel2 + { + + [Newtonsoft.Json.JsonProperty("expiration_date", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset Expiration_date { get; set; } + + [Newtonsoft.Json.JsonProperty("lot_number", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Lot_number { get; set; } + + [Newtonsoft.Json.JsonProperty("quantity_processed", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Quantity_processed { get; set; } + + } + + public partial class ValidationProblemDetails2 + { + + [Newtonsoft.Json.JsonProperty("detail", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Detail { get; set; } + + [Newtonsoft.Json.JsonProperty("errors", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.IDictionary> Errors { get; set; } + + [Newtonsoft.Json.JsonProperty("extensions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.IDictionary Extensions { get; set; } + + [Newtonsoft.Json.JsonProperty("instance", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Instance { get; set; } + + [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Status { get; set; } + + [Newtonsoft.Json.JsonProperty("title", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Title { get; set; } + + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Type { get; set; } + + } + + public enum ReturnAction + { + + _0 = 0, + + _1 = 1, + + _2 = 2, + + _3 = 3, + + } + + public partial class ReturnActionRequestedViewModel + { + + [Newtonsoft.Json.JsonProperty("action", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ReturnAction Action { get; set; } + + [Newtonsoft.Json.JsonProperty("action_type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public ReturnActionSource Action_type { get; set; } + + /// + /// Specific instructions to be taken for the inventory when processing the return + /// + [Newtonsoft.Json.JsonProperty("instructions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Instructions { get; set; } + + } + + public enum ReturnActionSource + { + + [System.Runtime.Serialization.EnumMember(Value = @"InventoryDefault")] + InventoryDefault = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"Override")] + Override = 1, + + } + + public partial class ReturnActionTakenViewModel + { + + [Newtonsoft.Json.JsonProperty("action", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ReturnAction Action { get; set; } + + /// + /// Reason the given action was taken + /// + [Newtonsoft.Json.JsonProperty("action_reason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Action_reason { get; set; } + + [Newtonsoft.Json.JsonProperty("lot_information", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Lot_information { get; set; } + + /// + /// Quantity of inventory processed with the taken action + /// + [Newtonsoft.Json.JsonProperty("quantity_processed", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.Range(1, 2147483647)] + public int Quantity_processed { get; set; } + + } + + public partial class ReturnInventory + { + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Id { get; set; } + + [Newtonsoft.Json.JsonProperty("lot_date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Lot_date { get; set; } + + [Newtonsoft.Json.JsonProperty("lot_number", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Lot_number { get; set; } + + [Newtonsoft.Json.JsonProperty("quantity", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Quantity { get; set; } + + [Newtonsoft.Json.JsonProperty("requested_action", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ReturnAction Requested_action { get; set; } + + } + + public partial class ReturnInventoryViewModel + { + + /// + /// ID of the inventory item to return + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Always)] + public int Id { get; set; } + + /// + /// Quantity of the returned inventory item in the return + /// + [Newtonsoft.Json.JsonProperty("quantity", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Range(1, 2147483647)] + public int Quantity { get; set; } + + [Newtonsoft.Json.JsonProperty("requested_action", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ReturnAction Requested_action { get; set; } + + } + + public partial class ReturnOrderViewModel + { + + [Newtonsoft.Json.JsonProperty("channel", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ChannelInfoViewModel2 Channel { get; set; } + + /// + /// Completed date for a return order. + /// + [Newtonsoft.Json.JsonProperty("completed_date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Completed_date { get; set; } + + /// + /// Customer name from the related shipment. + /// + [Newtonsoft.Json.JsonProperty("customer_name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Customer_name { get; set; } + + [Newtonsoft.Json.JsonProperty("fulfillment_center", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public FulfillmentCenterViewModel3 Fulfillment_center { get; set; } + + /// + /// Unique id of the Return Order + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Id { get; set; } + + /// + /// Date this return order was created + /// + [Newtonsoft.Json.JsonProperty("insert_date", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset Insert_date { get; set; } + + /// + /// List of inventory included in the return order + /// + [Newtonsoft.Json.JsonProperty("inventory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Inventory { get; set; } + + /// + /// Invoiced amount of return order (sum of transaction amounts) + /// + [Newtonsoft.Json.JsonProperty("invoice_amount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double? Invoice_amount { get; set; } + + /// + /// Id of the corresponding shipment that is the souce of the return + /// + [Newtonsoft.Json.JsonProperty("original_shipment_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Original_shipment_id { get; set; } + + /// + /// Client-defined external unique id of the return order + /// + [Newtonsoft.Json.JsonProperty("reference_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reference_id { get; set; } + + [Newtonsoft.Json.JsonProperty("return_type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public ReturnType Return_type { get; set; } + + [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public ReturnStatus Status { get; set; } + + /// + /// Store order for the related shipment. + /// + [Newtonsoft.Json.JsonProperty("store_order_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Store_order_id { get; set; } + + /// + /// Tracking number of the return shipment + /// + [Newtonsoft.Json.JsonProperty("tracking_number", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Tracking_number { get; set; } + + /// + /// Array of transactions affiliated with the return order + /// + [Newtonsoft.Json.JsonProperty("transactions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Transactions { get; set; } + + } + + public enum ReturnStatus + { + + [System.Runtime.Serialization.EnumMember(Value = @"AwaitingArrival")] + AwaitingArrival = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"Arrived")] + Arrived = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"Processing")] + Processing = 2, + + [System.Runtime.Serialization.EnumMember(Value = @"Completed")] + Completed = 3, + + [System.Runtime.Serialization.EnumMember(Value = @"Cancelled")] + Cancelled = 4, + + } + + public enum ReturnType + { + + [System.Runtime.Serialization.EnumMember(Value = @"Regular")] + Regular = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"ReturnToSender")] + ReturnToSender = 1, + + } + + public enum SortOrder3 + { + + _0 = 0, + + _1 = 1, + + } + + public enum TransactionLogSource + { + + [System.Runtime.Serialization.EnumMember(Value = @"ReturnLabelInvoice")] + ReturnLabelInvoice = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"ReturnProcessingFee")] + ReturnProcessingFee = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"ReturnToSenderFee")] + ReturnToSenderFee = 2, + + } + + public partial class TransactionViewModel + { + + /// + /// Transaction amount in dollars + /// + [Newtonsoft.Json.JsonProperty("amount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Amount { get; set; } + + [Newtonsoft.Json.JsonProperty("transaction_type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public TransactionLogSource Transaction_type { get; set; } + + } + + [Newtonsoft.Json.JsonConverter(typeof(JsonInheritanceConverter), "$type")] + [JsonInheritanceAttribute("BadRequestObjectResult", typeof(BadRequestObjectResult))] + [JsonInheritanceAttribute("ObjectResult", typeof(ObjectResult))] + [JsonInheritanceAttribute("UnprocessableEntityObjectResult", typeof(UnprocessableEntityObjectResult))] + public partial class ActionResult + { + + } + + public partial class BadRequestObjectResult : ObjectResult + { + + [Newtonsoft.Json.JsonProperty("content_types", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Content_types { get; set; } + + [Newtonsoft.Json.JsonProperty("declared_type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Declared_type { get; set; } + + [Newtonsoft.Json.JsonProperty("formatters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Formatters { get; set; } + + [Newtonsoft.Json.JsonProperty("status_code", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Status_code { get; set; } + + [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public object Value { get; set; } + + } + + public partial class GetWebhookResponse + { + + [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Items { get; set; } + + [Newtonsoft.Json.JsonProperty("next", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Next { get; set; } + + [Newtonsoft.Json.JsonProperty("prev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Prev { get; set; } + + } + + public partial class IOutputFormatter + { + + } + + [Newtonsoft.Json.JsonConverter(typeof(JsonInheritanceConverter), "$type")] + [JsonInheritanceAttribute("BadRequestObjectResult", typeof(BadRequestObjectResult))] + [JsonInheritanceAttribute("UnprocessableEntityObjectResult", typeof(UnprocessableEntityObjectResult))] + public partial class ObjectResult : ActionResult + { + + [Newtonsoft.Json.JsonProperty("content_types", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Content_types { get; set; } + + [Newtonsoft.Json.JsonProperty("declared_type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Declared_type { get; set; } + + [Newtonsoft.Json.JsonProperty("formatters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Formatters { get; set; } + + [Newtonsoft.Json.JsonProperty("status_code", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Status_code { get; set; } + + [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public object Value { get; set; } + + } + + public partial class UnprocessableEntityObjectResult : ObjectResult + { + + [Newtonsoft.Json.JsonProperty("content_types", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Content_types { get; set; } + + [Newtonsoft.Json.JsonProperty("declared_type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Declared_type { get; set; } + + [Newtonsoft.Json.JsonProperty("formatters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Formatters { get; set; } + + [Newtonsoft.Json.JsonProperty("status_code", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Status_code { get; set; } + + [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public object Value { get; set; } + + } + + public partial class WebhookViewModelV2 + { + + /// + /// TimeStamp the webhook subscription was created + /// + [Newtonsoft.Json.JsonProperty("created_at", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset Created_at { get; set; } + + /// + /// Description of the webhook subscription + /// + [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Description { get; set; } + + /// + /// ID of the webhook subscription + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + /// + /// A secret key used to sign the webhook payload for verifying its authenticity on the receiver's end. + /// + [Newtonsoft.Json.JsonProperty("secret", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.RegularExpression(@"^whsec_[a-zA-Z0-9+/]{32}$")] + public string Secret { get; set; } + + /// + /// List of event types the webhook will receive notifications for + /// + [Newtonsoft.Json.JsonProperty("topics", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Topics { get; set; } + + /// + /// URL subscription events will be posted to + /// + [Newtonsoft.Json.JsonProperty("url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Url { get; set; } + + } + + public partial class CreateSubscriptionRequest + { + + /// + /// Description of the webhook subscription. + /// + [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Description { get; set; } + + /// + /// A secret key used to sign the webhook payload for verifying its authenticity on the receiver's end. + /// + [Newtonsoft.Json.JsonProperty("secret", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.RegularExpression(@"^whsec_[a-zA-Z0-9+/]{32}$")] + public string Secret { get; set; } + + /// + /// The event types for which webhook callbacks will be received. + /// + [Newtonsoft.Json.JsonProperty("topics", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public System.Collections.Generic.ICollection Topics { get; set; } = new System.Collections.ObjectModel.Collection(); + + /// + /// The URL that will be called when an event matching the subscription topic occurs. + ///
The URL must use HTTPS, accept POST requests, and handle content of type application/json. + ///
+ [Newtonsoft.Json.JsonProperty("url", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] + public System.Uri Url { get; set; } + + } + + public partial class WebhookViewModelV22 + { + + /// + /// TimeStamp the webhook subscription was created + /// + [Newtonsoft.Json.JsonProperty("created_at", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset Created_at { get; set; } + + /// + /// Description of the webhook subscription + /// + [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Description { get; set; } + + /// + /// TimeStamp the webhook subscription was created + /// + [Newtonsoft.Json.JsonProperty("enabled", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Enabled { get; set; } + + /// + /// ID of the webhook subscription + /// + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + /// + /// List of event types the webhook will receive notifications for + /// + [Newtonsoft.Json.JsonProperty("topics", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Topics { get; set; } + + /// + /// URL subscription events will be posted to + /// + [Newtonsoft.Json.JsonProperty("url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Url { get; set; } + + } + + [System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Interface, AllowMultiple = true)] + internal class JsonInheritanceAttribute : System.Attribute + { + public JsonInheritanceAttribute(string key, System.Type type) + { + Key = key; + Type = type; + } + + public string Key { get; } + + public System.Type Type { get; } + } + + public class JsonInheritanceConverter : Newtonsoft.Json.JsonConverter + { + internal static readonly string DefaultDiscriminatorName = "discriminator"; + + private readonly string _discriminatorName; + + [System.ThreadStatic] + private static bool _isReading; + + [System.ThreadStatic] + private static bool _isWriting; + + public JsonInheritanceConverter() + { + _discriminatorName = DefaultDiscriminatorName; + } + + public JsonInheritanceConverter(string discriminatorName) + { + _discriminatorName = discriminatorName; + } + + public string DiscriminatorName { get { return _discriminatorName; } } + + public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer) + { + try + { + _isWriting = true; + + var jObject = Newtonsoft.Json.Linq.JObject.FromObject(value, serializer); + jObject.AddFirst(new Newtonsoft.Json.Linq.JProperty(_discriminatorName, GetSubtypeDiscriminator(value.GetType()))); + writer.WriteToken(jObject.CreateReader()); + } + finally + { + _isWriting = false; + } + } + + public override bool CanWrite + { + get + { + if (_isWriting) + { + _isWriting = false; + return false; + } + return true; + } + } + + public override bool CanRead + { + get + { + if (_isReading) + { + _isReading = false; + return false; + } + return true; + } + } + + public override bool CanConvert(System.Type objectType) + { + return true; + } + + public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer) + { + var jObject = serializer.Deserialize(reader); + if (jObject == null) + return null; + + var discriminatorValue = jObject.GetValue(_discriminatorName); + var discriminator = discriminatorValue != null ? Newtonsoft.Json.Linq.Extensions.Value(discriminatorValue) : null; + var subtype = GetObjectSubtype(objectType, discriminator); + + var objectContract = serializer.ContractResolver.ResolveContract(subtype) as Newtonsoft.Json.Serialization.JsonObjectContract; + if (objectContract == null || System.Linq.Enumerable.All(objectContract.Properties, p => p.PropertyName != _discriminatorName)) + { + jObject.Remove(_discriminatorName); + } + + try + { + _isReading = true; + return serializer.Deserialize(jObject.CreateReader(), subtype); + } + finally + { + _isReading = false; + } + } + + private System.Type GetObjectSubtype(System.Type objectType, string discriminator) + { + foreach (var attribute in System.Reflection.CustomAttributeExtensions.GetCustomAttributes(System.Reflection.IntrospectionExtensions.GetTypeInfo(objectType), true)) + { + if (attribute.Key == discriminator) + return attribute.Type; + } + + return objectType; + } + + private string GetSubtypeDiscriminator(System.Type objectType) + { + foreach (var attribute in System.Reflection.CustomAttributeExtensions.GetCustomAttributes(System.Reflection.IntrospectionExtensions.GetTypeInfo(objectType), true)) + { + if (attribute.Type == objectType) + return attribute.Key; + } + + return objectType.Name; + } + } + + + + public partial class ApiException : System.Exception + { + public int StatusCode { get; private set; } + + public string Response { get; private set; } + + public System.Collections.Generic.IReadOnlyDictionary> Headers { get; private set; } + + public ApiException(string message, int statusCode, string response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Exception innerException) + : base(message + "\n\nStatus: " + statusCode + "\nResponse: \n" + ((response == null) ? "(null)" : response.Substring(0, response.Length >= 512 ? 512 : response.Length)), innerException) + { + StatusCode = statusCode; + Response = response; + Headers = headers; + } + + public override string ToString() + { + return string.Format("HTTP Response: \n\n{0}\n\n{1}", Response, base.ToString()); + } + } + + public partial class ApiException : ApiException + { + public TResult Result { get; private set; } + + public ApiException(string message, int statusCode, string response, System.Collections.Generic.IReadOnlyDictionary> headers, TResult result, System.Exception innerException) + : base(message, statusCode, response, headers, innerException) + { + Result = result; + } + } + +} diff --git a/src/NSwag.CodeGeneration.CSharp.Tests/TestData/nhs-spineservices.json b/src/NSwag.CodeGeneration.CSharp.Tests/TestData/nhs-spineservices.json new file mode 100644 index 000000000..aa5422253 --- /dev/null +++ b/src/NSwag.CodeGeneration.CSharp.Tests/TestData/nhs-spineservices.json @@ -0,0 +1,2750 @@ +{ + "info": { + "description": "OpenODS API", + "title": "Organisation Data Service (ODS) API", + "version": "0.0.1" + }, + "openapi": "3.0.1", + "paths": { + "/ORD/2-0-0/notifications": { + "get": { + "description": "Returns a list of Notifications", + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "0": { + "value": "{\"DeletedOrganisations\": [{\"OrgID\": \"ABCD1234\",\"PrimaryRoleId\": \"RO96\",\"reason\": {\"code\": 3,\"description\": \"HUMAN ERROR\"},\"time\": \"2019-06-24 15:24:10\",\"type\": {\"code\": 1,\"description\": \"Machine\"}}]}" + } + }, + "schema": { + "properties": { + "DeletedOrganisations": { + "items": { + "properties": { + "OrgID": { + "type": "string" + }, + "PrimaryRoleId": { + "type": "string" + }, + "reason": { + "properties": { + "code": { + "type": "integer" + }, + "description": { + "type": "string" + } + }, + "type": "object" + }, + "time": { + "type": "string" + }, + "type": { + "properties": { + "code": { + "type": "integer" + }, + "description": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "description": "Returns a list of Notifications" + } + }, + "tags": [ + "ORD" + ] + } + }, + "/ORD/2-0-0/organisations": { + "get": { + "description": "Search for a list of Organisations, Multiple filters can be used at once except for RelTypeId which only works with the parameters defined in it's description.", + "parameters": [ + { + "description": "The current name of the organisation to search for, e.g. UK PLC", + "in": "query", + "name": "Name", + "schema": { + "type": "string" + } + }, + { + "description": "A Role or multiple roles separated by commas that organisations belong to, e.g. RO198,RO197", + "in": "query", + "name": "Roles", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Returns organisations that have been updated on or since this date in the format YYYY-MM-DD, e.g. 2021-12-01", + "in": "query", + "name": "LastChangeDate", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "The Relationship Type Id of the organisation to search for. This filter can only be used with the TargetOrgId and LastChangeDate, e.g. RE5", + "in": "query", + "name": "RelTypeId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "The Target Organisation Id of the organisation to search for. This filter cannot be used on it's own and can only be used with the RelTypeId, e.g. RRF12", + "in": "query", + "name": "TargetOrgId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "The Organisation Record class of the organisation to search for, e.g. RC2", + "in": "query", + "name": "OrgRecordClass", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "The Non-Primary Role Id of the organisation to search for, e.g. RO197", + "in": "query", + "name": "NonPrimaryRoleId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "The Primary Role Id of the organisation to search for, e.g. RO198", + "in": "query", + "name": "PrimaryRoleId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "The postcode of the organisation to search for, e.g. CW10 9FG", + "in": "query", + "name": "PostCode", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "The current status of the organisation to search for, expects Active or Inactive, e.g. Active", + "example": "Active", + "in": "query", + "name": "Status", + "required": false, + "schema": { + "enum": [ + "Active", + "Inactive" + ], + "type": "string" + } + }, + { + "description": "Limit the number of records that are returned, default=20, min=1, max=1000, e.g. 100", + "in": "query", + "name": "Limit", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "description": "Used in conjunction with the Limit filter, offset the returned values by the value given, e.g. 200", + "in": "query", + "name": "Offset", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "description": "Sets the format of the response, if not set the response with be in json format.", + "in": "query", + "name": "_format", + "required": false, + "schema": { + "enum": [ + "json", + "xml" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "0": { + "value": "{\"Organisations\": [{\"Name\": \"CAPGEMINI UK PLC\", \"OrgId\": \"8K816\", \"Status\": \"Active\", \"OrgRecordClass\": \"RC1\", \"PostCode\": \"GU21 6DB\", \"LastChangeDate\": \"2020-04-05\", \"PrimaryRoleId\": \"RO157\", \"PrimaryRoleDescription\": \"NON-NHS ORGANISATION\", \"OrgLink\": \"https://directory.spineservices.nhs.uk/ORD/2-0-0/organisations/8K816\"}, {\"Name\": \"CARE UK PLC - CRAGSTON COURT\", \"OrgId\": \"8FH41\", \"Status\": \"Active\", \"OrgRecordClass\": \"RC1\", \"PostCode\": \"NE5 3SR\", \"LastChangeDate\": \"2020-04-04\", \"PrimaryRoleId\": \"RO157\", \"PrimaryRoleDescription\": \"NON-NHS ORGANISATION\", \"OrgLink\": \"https://directory.spineservices.nhs.uk/ORD/2-0-0/organisations/8FH41\"}, {\"Name\": \"ENIGMA HEALTH UK PLC (ABBEYGATE)\", \"OrgId\": \"8HE70\", \"Status\": \"Active\", \"OrgRecordClass\": \"RC1\", \"PostCode\": \"KT16 8EH\", \"LastChangeDate\": \"2020-04-04\", \"PrimaryRoleId\": \"RO157\", \"PrimaryRoleDescription\": \"NON-NHS ORGANISATION\", \"OrgLink\": \"https://directory.spineservices.nhs.uk/ORD/2-0-0/organisations/8HE70\"}, {\"Name\": \"ENIGMA HEALTH UK PLC (COVEHAM HOUSE)\", \"OrgId\": \"8HC94\", \"Status\": \"Active\", \"OrgRecordClass\": \"RC1\", \"PostCode\": \"KT11 3EP\", \"LastChangeDate\": \"2020-04-04\", \"PrimaryRoleId\": \"RO157\", \"PrimaryRoleDescription\": \"NON-NHS ORGANISATION\", \"OrgLink\": \"https://directory.spineservices.nhs.uk/ORD/2-0-0/organisations/8HC94\"}, {\"Name\": \"@UK PLC\", \"OrgId\": \"8HG65\", \"Status\": \"Active\", \"OrgRecordClass\": \"RC1\", \"PostCode\": \"RG7 8NN\", \"LastChangeDate\": \"2020-04-04\", \"PrimaryRoleId\": \"RO157\", \"PrimaryRoleDescription\": \"NON-NHS ORGANISATION\", \"OrgLink\": \"https://directory.spineservices.nhs.uk/ORD/2-0-0/organisations/8HG65\"}]}" + } + }, + "schema": { + "properties": { + "Organisations": { + "items": { + "properties": { + "LastChangeDate": { + "type": "string" + }, + "Name": { + "type": "string" + }, + "OrgId": { + "type": "string" + }, + "OrgLink": { + "type": "string" + }, + "OrgRecordClass": { + "type": "string" + }, + "PostCode": { + "type": "string" + }, + "PrimaryRoleDescription": { + "type": "string" + }, + "PrimaryRoleId": { + "type": "string" + }, + "Status": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + }, + "application/xml": { + "examples": { + "0": { + "value": "\n \n CAPGEMINI UK PLC\n 8K816\n Active\n RC1\n GU21 6DB\n 2020-04-05\n RO157\n NON-NHS ORGANISATION\n https://dev.directory.spineservices.nhs.uk/ORD/2-0-0/organisations/8K816?_format=xml\n \n \n CARE UK PLC - CRAGSTON COURT\n 8FH41\n Active\n RC1\n NE5 3SR\n 2020-04-04\n RO157\n NON-NHS ORGANISATION\n https://dev.directory.spineservices.nhs.uk/ORD/2-0-0/organisations/8FH41?_format=xml\n \n" + } + }, + "schema": { + "properties": { + "Organisations": { + "items": { + "properties": { + "LastChangeDate": { + "type": "string" + }, + "Name": { + "type": "string" + }, + "OrgId": { + "type": "string" + }, + "OrgLink": { + "type": "string" + }, + "OrgRecordClass": { + "type": "string" + }, + "PostCode": { + "type": "string" + }, + "PrimaryRoleDescription": { + "type": "string" + }, + "PrimaryRoleId": { + "type": "string" + }, + "Status": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "description": "Search for a list of Organisations" + } + }, + "tags": [ + "ORD" + ] + } + }, + "/ORD/2-0-0/organisations/{ods_code}": { + "get": { + "description": "Returns a single Organisation", + "parameters": [ + { + "description": "ID of the Organisation", + "example": "RYVE7", + "in": "path", + "name": "ods_code", + "required": true, + "schema": { + "minimum": 1, + "type": "string" + } + }, + { + "description": "Sets the format of the response, if not set the response with be in json format.", + "in": "query", + "name": "_format", + "required": false, + "schema": { + "enum": [ + "json", + "xml" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "0": { + "value": "{\"Organisation\": {\"Name\": \"PLATT BRIDGE CLINIC\", \"Date\": [{\"Type\": \"Operational\", \"Start\": \"1993-04-01\", \"End\": \"2001-03-31\"}], \"OrgId\": {\"root\": \"2.16.840.1.113883.2.1.3.2.4.18.48\", \"assigningAuthorityName\": \"HSCIC\", \"extension\": \"RJY12\"}, \"Status\": \"Inactive\", \"LastChangeDate\": \"2013-05-08\", \"orgRecordClass\": \"RC2\", \"refOnly\": true, \"GeoLoc\": {\"Location\": {\"AddrLn1\": \"VICTORIA STREET\", \"AddrLn2\": \"PLATT BRIDGE\", \"Town\": \"WIGAN\", \"County\": \"LANCASHIRE\", \"PostCode\": \"WN2 5AH\", \"Country\": \"ENGLAND\"}}, \"Roles\": {\"Role\": [{\"id\": \"RO198\", \"uniqueRoleId\": 98719, \"primaryRole\": true, \"Date\": [{\"Type\": \"Operational\", \"Start\": \"1993-04-01\", \"End\": \"2001-03-31\"}], \"Status\": \"Inactive\"}]}}}" + } + }, + "schema": { + "properties": { + "Organisation": { + "properties": { + "Date": { + "items": { + "properties": { + "End": { + "type": "string" + }, + "Start": { + "type": "string" + }, + "Type": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "GeoLoc": { + "properties": { + "Location": { + "properties": { + "AddrLn1": { + "type": "string" + }, + "AddrLn2": { + "type": "string" + }, + "Country": { + "type": "string" + }, + "County": { + "type": "string" + }, + "PostCode": { + "type": "string" + }, + "Town": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "LastChangeDate": { + "type": "string" + }, + "Name": { + "type": "string" + }, + "OrgId": { + "properties": { + "assigningAuthorityName": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "root": { + "type": "string" + } + }, + "type": "object" + }, + "Roles": { + "properties": { + "Role": { + "items": { + "properties": { + "Date": { + "items": { + "properties": { + "End": { + "type": "string" + }, + "Start": { + "type": "string" + }, + "Type": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "Status": { + "type": "string" + }, + "id": { + "type": "string" + }, + "primaryRole": { + "type": "boolean" + }, + "uniqueRoleId": { + "type": "integer" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + }, + "Status": { + "type": "string" + }, + "orgRecordClass": { + "type": "string" + }, + "refOnly": { + "type": "boolean" + } + }, + "type": "object" + } + }, + "type": "object" + } + }, + "application/xml": { + "examples": { + "0": { + "value": " \n CAPGEMINI UK PLC\n \n \n \n \n \n \n \n \n \n 1 FORGE END\n WOKING\n GU21 6DB\n ENGLAND\n 10001155629\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n" + } + }, + "schema": { + "properties": { + "Organisation": { + "properties": { + "Date": { + "items": { + "properties": { + "End": { + "type": "string" + }, + "Start": { + "type": "string" + }, + "Type": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "GeoLoc": { + "properties": { + "Location": { + "properties": { + "AddrLn1": { + "type": "string" + }, + "AddrLn2": { + "type": "string" + }, + "Country": { + "type": "string" + }, + "County": { + "type": "string" + }, + "PostCode": { + "type": "string" + }, + "Town": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "LastChangeDate": { + "type": "string" + }, + "Name": { + "type": "string" + }, + "OrgId": { + "properties": { + "assigningAuthorityName": { + "type": "string" + }, + "extension": { + "type": "string" + }, + "root": { + "type": "string" + } + }, + "type": "object" + }, + "Roles": { + "properties": { + "Role": { + "items": { + "properties": { + "Date": { + "items": { + "properties": { + "End": { + "type": "string" + }, + "Start": { + "type": "string" + }, + "Type": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "Status": { + "type": "string" + }, + "id": { + "type": "string" + }, + "primaryRole": { + "type": "boolean" + }, + "uniqueRoleId": { + "type": "integer" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + }, + "Status": { + "type": "string" + }, + "orgRecordClass": { + "type": "string" + }, + "refOnly": { + "type": "boolean" + } + }, + "type": "object" + } + }, + "type": "object" + } + } + }, + "description": "Auto generated using Swagger Inspector" + } + }, + "tags": [ + "ORD" + ] + } + }, + "/ORD/2-0-0/recordclasses": { + "get": { + "description": "Returns a list of Record classes.", + "parameters": [ + { + "description": "Sets the format of the response, if not set the response with be in json format.", + "in": "query", + "name": "_format", + "required": false, + "schema": { + "enum": [ + "json", + "xml" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "0": { + "value": "{\"RecordClasses\": [{\"id\": \"RC1\", \"code\": \"1\", \"displayName\": \"HSCOrg\"}, {\"id\": \"RC2\", \"code\": \"2\", \"displayName\": \"HSCSite\"}]}" + } + }, + "schema": { + "properties": { + "RecordClasses": { + "items": { + "properties": { + "code": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + }, + "application/xml": { + "examples": { + "0": { + "value": "\n \n \n RC1\n 1\n HSCOrg\n \n \n RC2\n 2\n HSCSite\n \n \n" + } + }, + "schema": { + "properties": { + "RecordClasses": { + "items": { + "properties": { + "code": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "description": "Returns a list of Record classes." + } + }, + "tags": [ + "ORD" + ] + } + }, + "/ORD/2-0-0/recordclasses/{class_id}": { + "get": { + "description": "Returns a single record class", + "parameters": [ + { + "description": "ID of the class", + "example": "RC2", + "in": "path", + "name": "class_id", + "required": true, + "schema": { + "minimum": 1, + "type": "string" + } + }, + { + "description": "Sets the format of the response, if not set the response with be in json format.", + "in": "query", + "name": "_format", + "required": false, + "schema": { + "enum": [ + "json", + "xml" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "0": { + "value": "{\"RecordClasses\": [{\"id\": \"RC2\", \"code\": \"2\", \"displayName\": \"HSCSite\"}]}" + } + }, + "schema": { + "properties": { + "RecordClasses": { + "items": { + "properties": { + "code": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + }, + "application/xml": { + "examples": { + "0": { + "value": "\n \n \n RC1\n 1\n HSCOrg\n \n \n" + } + }, + "schema": { + "properties": { + "RecordClasses": { + "items": { + "properties": { + "code": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "description": "Returns a single record class" + } + }, + "tags": [ + "ORD" + ] + } + }, + "/ORD/2-0-0/rels": { + "get": { + "description": "Returns a list of Relationships", + "parameters": [ + { + "description": "Sets the format of the response, if not set the response with be in json format.", + "in": "query", + "name": "_format", + "required": false, + "schema": { + "enum": [ + "json", + "xml" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "0": { + "value": "{\"Relationships\": [{\"id\": \"RE10\", \"code\": \"10\", \"displayName\": \"IS COVID NOMINATED PAYEE FOR\"}, {\"id\": \"RE9\", \"code\": \"9\", \"displayName\": \"IS NOMINATED PAYEE FOR\"}, {\"id\": \"RE3\", \"code\": \"3\", \"displayName\": \"IS DIRECTED BY\"}, {\"id\": \"RE2\", \"code\": \"2\", \"displayName\": \"IS A SUB-DIVISION OF\"}, {\"id\": \"RE4\", \"code\": \"4\", \"displayName\": \"IS COMMISSIONED BY\"}, {\"id\": \"RE8\", \"code\": \"8\", \"displayName\": \"IS PARTNER TO\"}, {\"id\": \"RE5\", \"code\": \"5\", \"displayName\": \"IS LOCATED IN THE GEOGRAPHY OF\"}, {\"id\": \"RE6\", \"code\": \"6\", \"displayName\": \"IS OPERATED BY\"}]}" + } + }, + "schema": { + "properties": { + "Relationships": { + "items": { + "properties": { + "code": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + }, + "application/xml": { + "examples": { + "0": { + "value": "\n \n \n RE3\n 3\n IS DIRECTED BY\n \n \n RE2\n 2\n IS A SUB-DIVISION OF\n \n \n" + } + }, + "schema": { + "properties": { + "Relationships": { + "items": { + "properties": { + "code": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "description": "Returns a list of Relationships" + } + }, + "tags": [ + "ORD" + ] + } + }, + "/ORD/2-0-0/rels/{rel_id}": { + "get": { + "description": "Returns a single Relationship", + "parameters": [ + { + "description": "ID of the Relationship", + "example": "RE5", + "in": "path", + "name": "rel_id", + "required": true, + "schema": { + "minimum": 1, + "type": "string" + } + }, + { + "description": "Sets the format of the response, if not set the response with be in json format.", + "in": "query", + "name": "_format", + "required": false, + "schema": { + "enum": [ + "json", + "xml" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "0": { + "value": "{\"Relationships\": [{\"id\": \"RE5\", \"code\": \"5\", \"displayName\": \"IS LOCATED IN THE GEOGRAPHY OF\"}]}" + } + }, + "schema": { + "properties": { + "Relationships": { + "items": { + "properties": { + "code": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + }, + "application/xml": { + "examples": { + "0": { + "value": "\n \n \n RE3\n 3\n IS DIRECTED BY\n \n \n" + } + }, + "schema": { + "properties": { + "Relationships": { + "items": { + "properties": { + "code": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "description": "Returns a single Relationship" + } + }, + "tags": [ + "ORD" + ] + } + }, + "/ORD/2-0-0/roles": { + "get": { + "description": "Returns a list of Roles", + "parameters": [ + { + "description": "Sets the format of the response, if not set the response with be in json format.", + "in": "query", + "name": "_format", + "required": false, + "schema": { + "enum": [ + "json", + "xml" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "0": { + "value": "{\"Roles\": [{\"id\": \"RO200\",\"code\": \"200\",\"displayName\": \"WELSH ASSEMBLY\",\"primaryRole\": \"true\"},{\"id\": \"RO105\",\"code\": \"105\",\"displayName\": \"CANCER REGISTRY\",\"primaryRole\":\"true\"}]}" + } + }, + "schema": { + "properties": { + "Roles": { + "items": { + "properties": { + "code": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "id": { + "type": "string" + }, + "primaryRole": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + }, + "application/xml": { + "examples": { + "0": { + "value": "\n \n \n RO176\n 176\n INDEPENDENT SECTOR H/C PROVIDER SITE\n true\n \n \n RO80\n 80\n OUT OF HOURS COST CENTRE\n false\n \n \n" + } + }, + "schema": { + "properties": { + "Roles": { + "items": { + "properties": { + "code": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "id": { + "type": "string" + }, + "primaryRole": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "description": "Returns a list of Roles" + } + }, + "tags": [ + "ORD" + ] + } + }, + "/ORD/2-0-0/roles/{role_id}": { + "get": { + "description": "Returns a single Role", + "parameters": [ + { + "description": "ID of the Role", + "example": "RO197", + "in": "path", + "name": "role_id", + "required": true, + "schema": { + "minimum": 1, + "type": "string" + } + }, + { + "description": "Sets the format of the response, if not set the response with be in json format.", + "in": "query", + "name": "_format", + "required": false, + "schema": { + "enum": [ + "json", + "xml" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "0": { + "value": "{\"Roles\": [{\"id\": \"RO197\", \"code\": \"197\", \"displayName\": \"NHS TRUST\", \"primaryRole\": \"true\"}]}" + } + }, + "schema": { + "properties": { + "Roles": { + "items": { + "properties": { + "code": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "id": { + "type": "string" + }, + "primaryRole": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + }, + "application/xml": { + "examples": { + "0": { + "value": "\n \n \n RO176\n 176\n INDEPENDENT SECTOR H/C PROVIDER SITE\n true\n \n \n" + } + }, + "schema": { + "properties": { + "Roles": { + "items": { + "properties": { + "code": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "id": { + "type": "string" + }, + "primaryRole": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "description": "Returns a single Role" + } + }, + "tags": [ + "ORD" + ] + } + }, + "/ORD/2-0-0/sync": { + "get": { + "description": "Returns a list of Organisation endpoints", + "parameters": [ + { + "description": "Returns organisations that have been updated on or since this date in the format YYYY-MM-DD, e.g. 2021-12-01", + "example": "2022-01-01", + "in": "query", + "name": "LastChangeDate", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The format to return the response in, expects xml or json, e.g. xml", + "example": "xml", + "in": "query", + "name": "_format", + "schema": { + "enum": [ + "xml", + "json" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "0": { + "value": "{\"Organisations\": [{\"OrgLink\": \"https://dev.directory.spineservices.nhs.uk/ORD/2-0-0/organisations/71E\"}]}" + } + }, + "schema": { + "properties": { + "Organisations": { + "items": { + "properties": { + "OrgLink": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + }, + "application/xml": { + "examples": { + "0": { + "value": "https://dev.directory.spineservices.nhs.uk/ORD/2-0-0/organisations/71E?_format=xml" + } + }, + "schema": { + "properties": { + "Organisations": { + "items": { + "properties": { + "OrgLink": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + } + } + }, + "description": "Returns a list of Organisation endpoints" + } + }, + "tags": [ + "ORD" + ] + } + }, + "/STU3/CodeSystem/ODSAPI-OrganizationRole-1": { + "get": { + "description": "Returns a list of FHIR Roles", + "parameters": [ + { + "description": "Sets the format of the response, if not set the response with be in json format.", + "in": "query", + "name": "_format", + "required": false, + "schema": { + "enum": [ + "json", + "xml" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "0": { + "value": "{\n \"resourceType\": \"CodeSystem\",\n \"url\": \"https://localhost:4100/STU3/CodeSystem/ODSAPI-OrganizationRole-1\",\n \"version\": \"1.9.0\",\n \"name\": \"ODS API Organization Role\",\n \"status\": \"active\",\n \"date\": \"2019-02-21\",\n \"publisher\": \"NHS Digital\",\n \"contact\": [\n {\n \"name\": \"National Helpdesk Exeter\",\n \"telecom\": [\n {\n \"system\": \"email\",\n \"value\": \"exeter.helpdesk@nhs.net\",\n \"use\": \"work\"\n },\n {\n \"system\": \"phone\",\n \"value\": \"0300 303 4034\",\n \"use\": \"work\"\n }\n ]\n }\n ],\n \"description\": \"A CodeSystem that identifies the role(s) of the organization.\",\n \"copyright\": \"Copyright \u00a9 2017 Health and Social Care Information Centre. NHS Digital is the trading name of the Health and Social Care Information Centre.\",\n \"content\": \"complete\",\n \"concept\": [\n {\n \"code\": \"197\",\n \"display\": \"NHS TRUST\"\n },\n {\n \"code\": \"198\",\n \"display\": \"NHS TRUST SITE\"\n }\n ]\n}" + } + }, + "schema": { + "properties": { + "concept": { + "items": { + "properties": { + "code": { + "type": "string" + }, + "display": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "contact": { + "items": { + "properties": { + "name": { + "type": "string" + }, + "telecom": { + "items": { + "properties": { + "system": { + "type": "string" + }, + "use": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + }, + "type": "array" + }, + "content": { + "type": "string" + }, + "copyright": { + "type": "string" + }, + "date": { + "type": "string" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "publisher": { + "type": "string" + }, + "resourceType": { + "type": "string" + }, + "status": { + "type": "string" + }, + "url": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "type": "object" + } + }, + "application/xml": { + "examples": { + "0": { + "value": " \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n" + } + }, + "schema": { + "properties": { + "concept": { + "items": { + "properties": { + "code": { + "type": "string" + }, + "display": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "contact": { + "items": { + "properties": { + "name": { + "type": "string" + }, + "telecom": { + "items": { + "properties": { + "system": { + "type": "string" + }, + "use": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + }, + "type": "array" + }, + "content": { + "type": "string" + }, + "copyright": { + "type": "string" + }, + "date": { + "type": "string" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "publisher": { + "type": "string" + }, + "resourceType": { + "type": "string" + }, + "status": { + "type": "string" + }, + "url": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Returns a list of FHIR Roles" + } + }, + "tags": [ + "FHIR" + ] + } + }, + "/STU3/Organization": { + "get": { + "description": "Returns a list of FHIR Organizations", + "parameters": [ + { + "description": "The current name of the organisation to search for, e.g. integration", + "in": "query", + "name": "name", + "schema": { + "type": "string" + } + }, + { + "description": "A Role or multiple roles separated by commas that organisations belong to, e.g. RRF12", + "in": "query", + "name": "identifier", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "A Role or multiple roles separated by commas that organisations belong to, e.g. 101,107", + "in": "query", + "name": "ods-org-role", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "The ods-org-primaryRole of the organisation to search for. This filter cannot be used on it's own and can only be used with the ods-org-role, e.g. true", + "in": "query", + "name": "ods-org-primaryRole", + "required": false, + "schema": { + "enum": [ + true, + false + ], + "type": "string" + } + }, + { + "description": "The postcode of the organisation to search for, searches for postcode starting with this value. e.g. 'TS23'", + "in": "query", + "name": "address-postalcode", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "The postcode of the organisation to search for, searches for postcode containing this value. e.g. '2LA'", + "in": "query", + "name": "address-postalcode:contains", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "The postcode of the organisation to search for, searches for an exact match of this value. e.g. 'TS23 2LA'", + "in": "query", + "name": "address-postalcode:exact", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "The city of the organisation to search for, searches for cities starting with this value. e.g. 'lee'", + "in": "query", + "name": "address-city", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "The city of the organisation to search for, searches for cities containing this value. e.g. 'eed'", + "in": "query", + "name": "address-city:contains", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "The city of the organisation to search for, searches for an exact match of this value. e.g. 'leeds'", + "in": "query", + "name": "address-city:exact", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "The current status of the organisation to search for, expects true or false, e.g. false", + "example": true, + "in": "query", + "name": "active", + "required": false, + "schema": { + "enum": [ + true, + false + ], + "type": "string" + } + }, + { + "description": "Returns organisations by id, e.g. RRF", + "in": "query", + "name": "_id", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Returns organisations that have been since this date in the format gtYYYY-MM-DD, e.g. gt2021-12-01", + "in": "query", + "name": "_lastUpdated", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "The total count, only one value \"count\"", + "in": "query", + "name": "_summary", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Limit the number of records that are returned, min=0, max=20, e.g. 10", + "in": "query", + "name": "_count", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "description": "Offset the returned values by the value given, e.g. 2", + "in": "query", + "name": "_page", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "description": "Sets the format of the response, if not set the response with be in json format.", + "in": "query", + "name": "_format", + "required": false, + "schema": { + "enum": [ + "json", + "xml" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "0": { + "value": "{\n \"resourceType\": \"Bundle\",\n \"id\": \"41e4838a-4d0f-44d0-8951-8f463a934f66\",\n \"meta\": {\n \"lastUpdated\": \"2022-05-23T13:57:13+00:00\"\n },\n \"type\": \"searchset\",\n \"total\": \"59\",\n \"link\": [\n {\n \"relation\": \"self\",\n \"url\": \"https://localhost:4100/STU3/Organization?_count=20&_page=1\"\n },\n {\n \"relation\": \"first\",\n \"url\": \"https://localhost:4100/STU3/Organization?_count=20&_page=1\"\n },\n {\n \"relation\": \"last\",\n \"url\": \"https://localhost:4100/STU3/Organization?_count=20&_page=3\"\n },\n {\n \"relation\": \"next\",\n \"url\": \"https://localhost:4100/STU3/Organization?_count=20&_page=2\"\n }\n ],\n \"entry\": [\n {\n \"fullUrl\": \"https://localhost:4100/STU3/Organization/5QCAH\",\n \"resource\": {\n \"resourceType\": \"Organization\",\n \"id\": \"5QCAH\",\n \"meta\": {\n \"lastUpdated\": \"2013-05-08T00:00:00+00:00\",\n \"profile\": \"https://fhir.nhs.uk/STU3/StructureDefinition/ODSAPI-Organization-1\"\n },\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/STU3/StructureDefinition/Extension-ODSAPI-ActivePeriod-1\",\n \"valuePeriod\": {\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/STU3/StructureDefinition/Extension-ODSAPI-DateType-1\",\n \"valueString\": \"Operational\"\n }\n ],\n \"start\": \"2006-10-01\"\n }\n },\n {\n \"url\": \"https://fhir.nhs.uk/STU3/StructureDefinition/Extension-ODSAPI-ActivePeriod-1\",\n \"valuePeriod\": {\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/STU3/StructureDefinition/Extension-ODSAPI-DateType-1\",\n \"valueString\": \"Legal\"\n }\n ],\n \"start\": \"2006-10-01\",\n \"end\": \"2013-03-31\"\n }\n },\n {\n \"url\": \"https://fhir.nhs.uk/STU3/StructureDefinition/Extension-ODSAPI-OrganizationRole-1\",\n \"extension\": [\n {\n \"url\": \"role\",\n \"valueCoding\": {\n \"system\": \"https://localhost:4100/STU3/CodeSystem/ODSAPI-OrganizationRole-1\",\n \"code\": \"180\",\n \"display\": \"PRIMARY CARE TRUST SITE\"\n }\n },\n {\n \"url\": \"primaryRole\",\n \"valueBoolean\": true\n },\n {\n \"url\": \"activePeriod\",\n \"valuePeriod\": {\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/STU3/StructureDefinition/Extension-ODSAPI-DateType-1\",\n \"valueString\": \"Operational\"\n }\n ],\n \"start\": \"2006-10-01\"\n }\n },\n {\n \"url\": \"activePeriod\",\n \"valuePeriod\": {\n \"extension\": [\n {\n \"url\": \"https://fhir.nhs.uk/STU3/StructureDefinition/Extension-ODSAPI-DateType-1\",\n \"valueString\": \"Legal\"\n }\n ],\n \"start\": \"2006-10-01\",\n \"end\": \"2013-03-31\"\n }\n },\n {\n \"url\": \"status\",\n \"valueString\": \"Active\"\n }\n ]\n }\n ],\n \"identifier\": {\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\n \"value\": \"5QCAH\"\n },\n \"active\": true,\n \"type\": {\n \"coding\": {\n \"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/ODSAPI-OrganizationRecordClass-1\",\n \"code\": \"2\",\n \"display\": \"HSCSite\"\n }\n },\n \"name\": \"EASTNEY HEALTH CENTRE\",\n \"address\": {\n \"line\": [\n \"HIGHLAND ROAD\"\n ],\n \"city\": \"SOUTHSEA\",\n \"district\": \"HAMPSHIRE\",\n \"postalCode\": \"LS1 1AJ\",\n \"country\": \"ENGLAND\"\n }\n }\n }\n ]\n}" + } + }, + "schema": { + "properties": { + "entry": { + "items": { + "properties": { + "active": { + "type": "boolean" + }, + "address": { + "properties": { + "city": { + "type": "string" + }, + "country": { + "type": "string" + }, + "district": { + "type": "string" + }, + "line": { + "items": { + "type": "string" + }, + "type": "array" + }, + "postalCode": { + "type": "string" + } + }, + "type": "object" + }, + "extension": { + "items": { + "properties": { + "url": { + "type": "string" + }, + "valuePeriod": { + "properties": { + "end": { + "type": "string" + }, + "extension": { + "items": { + "properties": { + "url": { + "type": "string" + }, + "valueString": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "start": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "type": "array" + }, + "id": { + "type": "string" + }, + "identifier": { + "properties": { + "system": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "type": "object" + }, + "meta": { + "properties": { + "lastUpdated": { + "type": "string" + }, + "profile": { + "type": "string" + } + }, + "type": "object" + }, + "name": { + "type": "string" + }, + "resourceType": { + "type": "string" + }, + "type": { + "properties": { + "coding": { + "properties": { + "code": { + "type": "string" + }, + "display": { + "type": "string" + }, + "system": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "type": "array" + }, + "id": { + "type": "string" + }, + "link": { + "items": { + "properties": { + "relation": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "meta": { + "properties": { + "lastUpdated": { + "type": "string" + } + }, + "type": "object" + }, + "resourceType": { + "type": "string" + }, + "total": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "type": "object" + } + }, + "application/xml": { + "examples": { + "0": { + "value": " \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n
\n
\n
\n
\n
" + } + }, + "schema": { + "properties": { + "entry": { + "items": { + "properties": { + "active": { + "type": "boolean" + }, + "address": { + "properties": { + "city": { + "type": "string" + }, + "country": { + "type": "string" + }, + "district": { + "type": "string" + }, + "line": { + "items": { + "type": "string" + }, + "type": "array" + }, + "postalCode": { + "type": "string" + } + }, + "type": "object" + }, + "extension": { + "items": { + "properties": { + "url": { + "type": "string" + }, + "valuePeriod": { + "properties": { + "end": { + "type": "string" + }, + "extension": { + "items": { + "properties": { + "url": { + "type": "string" + }, + "valueString": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "start": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "type": "array" + }, + "id": { + "type": "string" + }, + "identifier": { + "properties": { + "system": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "type": "object" + }, + "meta": { + "properties": { + "lastUpdated": { + "type": "string" + }, + "profile": { + "type": "string" + } + }, + "type": "object" + }, + "name": { + "type": "string" + }, + "resourceType": { + "type": "string" + }, + "type": { + "properties": { + "coding": { + "properties": { + "code": { + "type": "string" + }, + "display": { + "type": "string" + }, + "system": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "type": "array" + }, + "id": { + "type": "string" + }, + "link": { + "items": { + "properties": { + "relation": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "meta": { + "properties": { + "lastUpdated": { + "type": "string" + } + }, + "type": "object" + }, + "resourceType": { + "type": "string" + }, + "total": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Returns a list of FHIR Organizations" + } + }, + "tags": [ + "FHIR" + ] + } + }, + "/STU3/Organization/{ods_code}": { + "get": { + "description": "Returns FHIR Organization details", + "parameters": [ + { + "description": "ID of the Organization", + "example": "RJY12", + "in": "path", + "name": "ods_code", + "required": true, + "schema": { + "minimum": 1, + "type": "string" + } + }, + { + "description": "Sets the format of the response, if not set the response with be in json format.", + "in": "query", + "name": "_format", + "required": false, + "schema": { + "enum": [ + "json", + "xml" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "0": { + "value": "{\"resourceType\": \"Organization\", \"id\": \"RJY12\", \"meta\": {\"lastUpdated\": \"2013-05-08T00:00:00+00:00\", \"profile\": \"https://fhir.nhs.uk/STU3/StructureDefinition/ODSAPI-Organization-1\"}, \"extension\": [{\"url\": \"https://fhir.nhs.uk/STU3/StructureDefinition/Extension-ODSAPI-ActivePeriod-1\", \"valuePeriod\": {\"extension\": [{\"url\": \"https://fhir.nhs.uk/STU3/StructureDefinition/Extension-ODSAPI-DateType-1\", \"valueString\": \"Operational\"}], \"start\": \"1993-04-01\", \"end\": \"2001-03-31\"}}, {\"url\": \"https://fhir.nhs.uk/STU3/StructureDefinition/Extension-ODSAPI-OrganizationRole-1\", \"extension\": [{\"url\": \"role\", \"valueCoding\": {\"system\": \"https://directory.spineservices.nhs.uk/STU3/CodeSystem/ODSAPI-OrganizationRole-1\", \"code\": \"198\", \"display\": \"NHS TRUST SITE\"}}, {\"url\": \"primaryRole\", \"valueBoolean\": true}, {\"url\": \"activePeriod\", \"valuePeriod\": {\"extension\": [{\"url\": \"https://fhir.nhs.uk/STU3/StructureDefinition/Extension-ODSAPI-DateType-1\", \"valueString\": \"Operational\"}], \"start\": \"1993-04-01\", \"end\": \"2001-03-31\"}}, {\"url\": \"status\", \"valueString\": \"Inactive\"}]}], \"identifier\": {\"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\", \"value\": \"RJY12\"}, \"active\": false, \"type\": {\"coding\": {\"system\": \"https://fhir.nhs.uk/STU3/CodeSystem/ODSAPI-OrganizationRecordClass-1\", \"code\": \"2\", \"display\": \"HSCSite\"}}, \"name\": \"PLATT BRIDGE CLINIC\", \"address\": {\"line\": [\"VICTORIA STREET\", \"PLATT BRIDGE\"], \"city\": \"WIGAN\", \"district\": \"LANCASHIRE\", \"postalCode\": \"WN2 5AH\", \"country\": \"ENGLAND\"}}" + } + }, + "schema": { + "properties": { + "active": { + "type": "boolean" + }, + "address": { + "properties": { + "city": { + "type": "string" + }, + "country": { + "type": "string" + }, + "district": { + "type": "string" + }, + "line": { + "items": { + "type": "string" + }, + "type": "array" + }, + "postalCode": { + "type": "string" + } + }, + "type": "object" + }, + "extension": { + "items": { + "properties": { + "url": { + "type": "string" + }, + "valuePeriod": { + "properties": { + "end": { + "type": "string" + }, + "extension": { + "items": { + "properties": { + "url": { + "type": "string" + }, + "valueString": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "start": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "type": "array" + }, + "id": { + "type": "string" + }, + "identifier": { + "properties": { + "system": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "type": "object" + }, + "meta": { + "properties": { + "lastUpdated": { + "type": "string" + }, + "profile": { + "type": "string" + } + }, + "type": "object" + }, + "name": { + "type": "string" + }, + "resourceType": { + "type": "string" + }, + "type": { + "properties": { + "coding": { + "properties": { + "code": { + "type": "string" + }, + "display": { + "type": "string" + }, + "system": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + } + }, + "type": "object" + } + }, + "application/xml": { + "examples": { + "0": { + "value": " \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n
\n
" + } + }, + "schema": { + "properties": { + "active": { + "type": "boolean" + }, + "address": { + "properties": { + "city": { + "type": "string" + }, + "country": { + "type": "string" + }, + "district": { + "type": "string" + }, + "line": { + "items": { + "type": "string" + }, + "type": "array" + }, + "postalCode": { + "type": "string" + } + }, + "type": "object" + }, + "extension": { + "items": { + "properties": { + "url": { + "type": "string" + }, + "valuePeriod": { + "properties": { + "end": { + "type": "string" + }, + "extension": { + "items": { + "properties": { + "url": { + "type": "string" + }, + "valueString": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "start": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "type": "array" + }, + "id": { + "type": "string" + }, + "identifier": { + "properties": { + "system": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "type": "object" + }, + "meta": { + "properties": { + "lastUpdated": { + "type": "string" + }, + "profile": { + "type": "string" + } + }, + "type": "object" + }, + "name": { + "type": "string" + }, + "resourceType": { + "type": "string" + }, + "type": { + "properties": { + "coding": { + "properties": { + "code": { + "type": "string" + }, + "display": { + "type": "string" + }, + "system": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + } + }, + "type": "object" + } + } + }, + "description": "Returns FHIR Organization details" + } + }, + "tags": [ + "FHIR" + ] + } + }, + "/STU3/metadata": { + "get": { + "description": "Returns Metadata", + "parameters": [ + { + "description": "Sets the format of the response, if not set the response with be in json format.", + "in": "query", + "name": "_format", + "required": false, + "schema": { + "enum": [ + "json", + "xml" + ], + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "examples": { + "0": { + "value": "{\"resourceType\":\"CapabilityStatement\",\"url\":\"https://directory.spineservices.nhs.uk/STU3/metadata?\",\"version\":\"1.0.0\",\"name\":\"ODSAPI-CapabilityStatement-1\",\"status\":\"active\",\"date\":\"2018-04-12\",\"publisher\":\"NHS Digital\",\"contact\":[{\"name\":\"National Helpdesk Exeter\",\"telecom\":[{\"system\":\"email\",\"value\":\"exeter.helpdesk@nhs.net\",\"use\":\"work\"},{\"system\":\"phone\",\"value\":\"0300 303 4034\",\"use\":\"work\"}]}],\"description\":\"An API for retrieving organisation data from the NHS Digital Organisation Data Service.\",\"copyright\":\"Copyright \u00a9 2017 NHS Digital\",\"kind\":\"instance\",\"instantiates\":[\"https://fhir.nhs.uk/STU3/CapabilityStatement/ODSAPI-CapabilityStatement-1\"],\"fhirVersion\":\"3.0.1\",\"acceptUnknown\":\"no\",\"format\":[\"application/fhir+xml\",\"application/fhir+json\"],\"implementationGuide\":[\"https://developer.nhs.uk/apis/ods/\"],\"profile\":[{\"reference\":\"https://fhir.nhs.uk/STU3/StructureDefinition/ODSAPI-Organization-1\"},{\"reference\":\"https://fhir.nhs.uk/STU3/StructureDefinition/ODSAPI-ActivePeriod-1\"},{\"reference\":\"https://fhir.nhs.uk/STU3/StructureDefinition/Extension-ODSAPI-ActivePeriod-1\"},{\"reference\":\"https://fhir.nhs.uk/STU3/StructureDefinition/Extension-ODSAPI-OrganizationRole-1\"},{\"reference\":\"https://fhir.nhs.uk/STU3/StructureDefinition/Extension-ODSAPI-UPRN-1\"},{\"reference\":\"https://fhir.nhs.uk/STU3/StructureDefinition/Extension-ODSAPI-DateType-1\"}],\"rest\":[{\"mode\":\"server\",\"security\":{\"cors\":true},\"resource\":[{\"extension\":[{\"url\":\"http://hl7.org/fhir/StructureDefinition/capabilitystatement-search-parameter-combination\",\"extension\":[{\"url\":\"required\",\"valueString\":\"ods-org-primaryRole\"},{\"url\":\"required\",\"valueString\":\"ods-org-role\"}]}],\"type\":\"Organization\",\"profile\":{\"reference\":\"https://fhir.nhs.uk/STU3/StructureDefinition/ODSAPI-Organization-1\"},\"interaction\":[{\"code\":\"read\"},{\"code\":\"search-type\"}],\"versioning\":\"no-version\",\"readHistory\":false,\"updateCreate\":false,\"conditionalCreate\":false,\"conditionalRead\":\"not-supported\",\"conditionalUpdate\":false,\"conditionalDelete\":\"not-supported\",\"searchParam\":[{\"name\":\"_id\",\"type\":\"token\"},{\"name\":\"_lastUpdated\",\"type\":\"date\"},{\"name\":\"_count\",\"type\":\"number\"},{\"name\":\"_summary\",\"type\":\"token\"},{\"name\":\"identifier\",\"type\":\"token\"},{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"active\",\"type\":\"token\"},{\"name\":\"address-city\",\"type\":\"string\"},{\"name\":\"address-postalcode\",\"type\":\"string\"},{\"name\":\"ods-org-role\",\"definition\":\"https://fhir.nhs.uk/STU3/SearchParameter/ODSAPI-OrganizationRole-Role-1\",\"type\":\"token\"},{\"name\":\"ods-org-primaryRole\",\"definition\":\"https://fhir.nhs.uk/STU3/SearchParameter/ODSAPI-OrganizationRole-PrimaryRole-1\",\"type\":\"token\"}]},{\"type\":\"CodeSystem\",\"interaction\":[{\"code\":\"read\"}],\"versioning\":\"no-version\",\"readHistory\":false,\"updateCreate\":false,\"conditionalCreate\":false,\"conditionalRead\":\"not-supported\",\"conditionalUpdate\":false,\"conditionalDelete\":\"not-supported\",\"searchParam\":[{\"name\":\"url\",\"type\":\"string\",\"documentation\":\"The logical URL for the CodeSystem\"}]}]}]}" + } + }, + "schema": { + "properties": { + "acceptUnknown": { + "type": "string" + }, + "contact": { + "items": { + "properties": { + "name": { + "type": "string" + }, + "telecom": { + "items": { + "properties": { + "system": { + "type": "string" + }, + "use": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + }, + "type": "array" + }, + "copyright": { + "type": "string" + }, + "date": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fhirVersion": { + "type": "string" + }, + "format": { + "items": { + "type": "string" + }, + "type": "array" + }, + "implementationGuide": { + "items": { + "type": "string" + }, + "type": "array" + }, + "instantiates": { + "items": { + "type": "string" + }, + "type": "array" + }, + "kind": { + "type": "string" + }, + "name": { + "type": "string" + }, + "profile": { + "items": { + "properties": { + "reference": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "publisher": { + "type": "string" + }, + "resourceType": { + "type": "string" + }, + "rest": { + "items": { + "properties": { + "mode": { + "type": "string" + }, + "resource": { + "items": { + "properties": { + "conditionalCreate": { + "type": "boolean" + }, + "conditionalDelete": { + "type": "string" + }, + "conditionalRead": { + "type": "string" + }, + "conditionalUpdate": { + "type": "boolean" + }, + "extension": { + "items": { + "properties": { + "extension": { + "items": { + "properties": { + "url": { + "type": "string" + }, + "valueString": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "url": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "interaction": { + "items": { + "properties": { + "code": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "profile": { + "properties": { + "reference": { + "type": "string" + } + }, + "type": "object" + }, + "readHistory": { + "type": "boolean" + }, + "searchParam": { + "items": { + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "type": { + "type": "string" + }, + "updateCreate": { + "type": "boolean" + }, + "versioning": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "security": { + "properties": { + "cors": { + "type": "boolean" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "type": "array" + }, + "status": { + "type": "string" + }, + "url": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "type": "object" + } + }, + "application/xml": { + "examples": { + "0": { + "value": " \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n" + } + }, + "schema": { + "properties": { + "acceptUnknown": { + "type": "string" + }, + "contact": { + "items": { + "properties": { + "name": { + "type": "string" + }, + "telecom": { + "items": { + "properties": { + "system": { + "type": "string" + }, + "use": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + }, + "type": "array" + }, + "copyright": { + "type": "string" + }, + "date": { + "type": "string" + }, + "description": { + "type": "string" + }, + "fhirVersion": { + "type": "string" + }, + "format": { + "items": { + "type": "string" + }, + "type": "array" + }, + "implementationGuide": { + "items": { + "type": "string" + }, + "type": "array" + }, + "instantiates": { + "items": { + "type": "string" + }, + "type": "array" + }, + "kind": { + "type": "string" + }, + "name": { + "type": "string" + }, + "profile": { + "items": { + "properties": { + "reference": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "publisher": { + "type": "string" + }, + "resourceType": { + "type": "string" + }, + "rest": { + "items": { + "properties": { + "mode": { + "type": "string" + }, + "resource": { + "items": { + "properties": { + "conditionalCreate": { + "type": "boolean" + }, + "conditionalDelete": { + "type": "string" + }, + "conditionalRead": { + "type": "string" + }, + "conditionalUpdate": { + "type": "boolean" + }, + "extension": { + "items": { + "properties": { + "extension": { + "items": { + "properties": { + "url": { + "type": "string" + }, + "valueString": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "url": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "interaction": { + "items": { + "properties": { + "code": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "profile": { + "properties": { + "reference": { + "type": "string" + } + }, + "type": "object" + }, + "readHistory": { + "type": "boolean" + }, + "searchParam": { + "items": { + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "type": { + "type": "string" + }, + "updateCreate": { + "type": "boolean" + }, + "versioning": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "security": { + "properties": { + "cors": { + "type": "boolean" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "type": "array" + }, + "status": { + "type": "string" + }, + "url": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "type": "object" + } + } + }, + "description": "Returns Metadata" + } + }, + "tags": [ + "FHIR" + ] + } + } + }, + "tags": [ + { + "description": "Access a reduced dataset of health and social care organisations in England and Wales, such as trusts or GP practices, using our Organisation Data Service (ODS) FHIR API. ", + "name": "ORD" + }, + { + "description": "Access a reduced dataset of health and social care organisations in England and Wales, such as trusts or GP practices, using our Organisation Data Service (ODS) FHIR API. ", + "externalDocs": { + "url": "http://hl7.org/fhir/stu3/" + }, + "name": "FHIR" + } + ] +} \ No newline at end of file diff --git a/src/NSwag.CodeGeneration.CSharp.Tests/TestData/shipbob-2025-07.json b/src/NSwag.CodeGeneration.CSharp.Tests/TestData/shipbob-2025-07.json new file mode 100644 index 000000000..9a7bf1040 --- /dev/null +++ b/src/NSwag.CodeGeneration.CSharp.Tests/TestData/shipbob-2025-07.json @@ -0,0 +1,22968 @@ +{ + "openapi": "3.0.0", + "x-mcp": { + "enabled": true + }, + "info": { + "title": "ShipBob Developer API (2025-07)", + "version": "2025-07" + }, + "servers": [ + { + "url": "https://api.shipbob.com/2025-07" + }, + { + "url": "https://sandbox-api.shipbob.com/2025-07" + } + ], + "paths": { + "/channel": { + "get": { + "summary": "Get channels", + "operationId": "c94a92715c0351cba55c1eff9c4649f2", + "parameters": [ + { + "name": "RecordsPerPage", + "in": "query", + "description": "The number of records to return per page. This parameter is used for pagination. If not provided, a default value will be used.", + "schema": { + "type": "integer", + "default": 50, + "additionalProperties": false + } + }, + { + "name": "Cursor", + "in": "query", + "description": "A cursor for pagination. This parameter is used to fetch the next set of results.", + "schema": { + "type": "string", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Channels.ChannelsV2ViewModel" + }, + "example": { + "items": [ + { + "application_name": "SMA", + "id": 128944, + "name": "Privileged Access Token Wednesday, July 9, 2025", + "scopes": [ + "pricing_read", + "fulfillments_write", + "returns_read", + "receiving_read", + "fulfillments_read", + "returns_write", + "locations_write", + "channels_read", + "webhooks_write", + "locations_read", + "orders_write", + "webhooks_read", + "inventory_read", + "billing_read", + "receiving_write", + "inventory_write", + "orders_read", + "products_read", + "products_write" + ] + }, + { + "application_name": "ShipBob", + "id": 128943, + "name": "ShipBob Default", + "scopes": [ + "pricing_read", + "returns_read", + "receiving_read", + "fulfillments_read", + "channels_read", + "locations_read", + "webhooks_read", + "inventory_read", + "billing_read", + "orders_read", + "products_read" + ] + } + ], + "next": "string", + "prev": "string" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Channels.ErrorResponse" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Channels" + ] + } + }, + "/webhook": { + "get": { + "summary": "Get Subscriptions\n", + "description": " This endpoint returns a list of webhook subscriptions.\n", + "operationId": "e9181e4f0862d1d40e984035d6261bc9", + "parameters": [ + { + "name": "RecordsPerPage", + "in": "query", + "description": "Number of webhooks returned per page in a paginated response.\n", + "schema": { + "type": "number", + "format": "int32", + "maximum": 250.0, + "minimum": 1.0, + "additionalProperties": false + } + }, + { + "name": "Cursor", + "in": "query", + "description": "The number of records to skip before starting to return the results. Used for pagination.\n", + "schema": { + "type": "string", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Webhooks.GetWebhookResponse" + }, + "example": { + "items": [ + { + "created_at": "2019-08-24T14:15:22Z", + "description": "string", + "enabled": true, + "id": "12345", + "topics": [ + "string" + ], + "url": "string" + } + ], + "next": "string", + "prev": "string" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Webhooks.BadRequestObjectResult" + }, + "example": { + "$type": "string", + "content_types": [ + "string" + ], + "declared_type": "string", + "formatters": [ + {} + ], + "status_code": 0, + "value": {} + } + } + } + }, + "401": { + "description": "No access right at this time" + }, + "403": { + "description": "No access" + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Webhooks" + ] + }, + "post": { + "summary": "Create Subscription\n", + "description": "This endpoint creates a new webhook subscription.\n", + "operationId": "72e0c2d956e31774c876c58c53e8dce0", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Webhooks.V2.Create.WebhookViewModelV2" + }, + "example": { + "created_at": "2019-08-24T14:15:22Z", + "description": "string", + "id": "12345", + "secret": "string", + "topics": [ + "string" + ], + "url": "string" + } + } + } + }, + "401": { + "description": "No access right at this time" + }, + "403": { + "description": "No access" + }, + "422": { + "description": "Client Error", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Webhooks.UnprocessableEntityObjectResult" + }, + "example": { + "$type": "string", + "content_types": [ + "string" + ], + "declared_type": "string", + "formatters": [ + {} + ], + "status_code": 0, + "value": {} + } + } + } + } + }, + "requestBody": { + "x-name": "webhooks.V2.CreateSubscriptionRequest", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Webhooks.V2.CreateSubscriptionRequest" + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Webhooks" + ] + } + }, + "/webhook/{id}": { + "delete": { + "summary": "Delete Subscription\n", + "description": " This endpoint deletes a webhook subscription.\n", + "operationId": "db62c75d5623351365b17c3d309b2745", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "This is the id of the webhook subscription to delete\n", + "schema": { + "type": "string", + "additionalProperties": false + } + } + ], + "responses": { + "204": { + "description": "Success" + }, + "401": { + "description": "No access right at this time" + }, + "403": { + "description": "No access" + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Webhooks" + ] + } + }, + "/return": { + "post": { + "summary": "Create a return\n", + "operationId": "729d0c0abc4835ba638c9a2a66ebc2d4", + "parameters": [ + { + "name": "shipbob_channel_id", + "in": "header", + "required": true, + "description": "", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success" + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Authorization missing or invalid" + }, + "403": { + "description": "The provided credentials are not authorized to access this resource" + } + }, + "requestBody": { + "x-name": "returns.CreateReturnRequest", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Returns.CreateReturnRequest" + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Returns" + ] + }, + "get": { + "summary": "Get Return Orders\n", + "operationId": "09ca3f93325d9c169f4d54f2d37ee0b0", + "parameters": [ + { + "name": "Ids", + "in": "query", + "description": "", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "ReferenceIds", + "in": "query", + "description": "", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "Status", + "in": "query", + "description": "", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "FulfillmentCenterIds", + "in": "query", + "description": "", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "TrackingNumbers", + "in": "query", + "description": "", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "OriginalShipmentIds", + "in": "query", + "description": "", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "InventoryIds", + "in": "query", + "description": "", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "StartDate", + "in": "query", + "description": "", + "schema": { + "type": "string", + "format": "date-time", + "additionalProperties": false + } + }, + { + "name": "EndDate", + "in": "query", + "description": "", + "schema": { + "type": "string", + "format": "date-time", + "additionalProperties": false + } + }, + { + "name": "ReturnTypes", + "in": "query", + "description": "", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "ReturnActions", + "in": "query", + "description": "", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "StoreOrderIds", + "in": "query", + "description": "", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "SortBy", + "in": "query", + "description": "", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "Cursor", + "in": "query", + "description": "", + "schema": { + "type": "number", + "format": "int32", + "maximum": 2147483647.0, + "minimum": 1.0, + "additionalProperties": false + } + }, + { + "name": "Limit", + "in": "query", + "description": "", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + }, + { + "name": "SortOrder", + "in": "query", + "description": "", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + }, + { + "name": "CompletedStartDate", + "in": "query", + "description": "", + "schema": { + "type": "string", + "format": "date-time", + "additionalProperties": false + } + }, + { + "name": "CompletedEndDate", + "in": "query", + "description": "", + "schema": { + "type": "string", + "format": "date-time", + "additionalProperties": false + } + }, + { + "name": "shipbob_channel_id", + "in": "header", + "description": "Channel Id for operation", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success" + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Authorization missing or invalid" + }, + "403": { + "description": "The provided credentials are not authorized to access this resource" + }, + "404": { + "description": "Resource Not Found" + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Returns" + ] + } + }, + "/return/{id}": { + "get": { + "summary": " Get Return Order\n", + "operationId": "7c1ecda086f397c4c23722abb27926ce", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + }, + { + "name": "shipbob_channel_id", + "in": "header", + "description": "", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success" + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Authorization missing or invalid" + }, + "403": { + "description": "The provided credentials are not authorized to access this resource" + }, + "404": { + "description": "Resource Not Found" + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Returns" + ] + }, + "put": { + "summary": "Modify Return Order\n", + "operationId": "8fd3220063faa081315dc98002f9fac8", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Id of the return order", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + }, + { + "name": "shipbob_channel_id", + "in": "header", + "required": true, + "description": "Channel Id for Operation\n", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Returns.ReturnOrderViewModel" + }, + "example": { + "channel": { + "id": 0, + "name": "ShipBobs-Shopify-Store" + }, + "completed_date": "2019-08-24T14:15:22Z", + "customer_name": "string", + "fulfillment_center": { + "id": 0, + "name": "Cicero (IL)" + }, + "id": 0, + "insert_date": "2019-08-24T14:15:22Z", + "inventory": [ + { + "action_requested": { + "action": "Default", + "action_type": "InventoryDefault", + "instructions": "string" + }, + "action_taken": [ + { + "action": "Default", + "action_reason": "string", + "lot_information": [ + { + "expiration_date": "2019-08-24T14:15:22Z", + "lot_number": "string", + "quantity_processed": 0 + } + ], + "quantity_processed": 1 + } + ], + "id": 0, + "name": "string", + "quantity": 0 + } + ], + "invoice_amount": 0.1, + "original_shipment_id": 0, + "reference_id": "string", + "return_type": "Regular", + "status": "AwaitingArrival", + "store_order_id": "string", + "tracking_number": "860C8CDC8F0B4FC7AB69AC86C20539EC", + "transactions": [ + { + "amount": 2.5, + "transaction_type": "ReturnLabelInvoice" + } + ] + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Returns.ValidationProblemDetails" + }, + "example": { + "detail": "string", + "errors": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + }, + "extensions": { + "property1": {}, + "property2": {} + }, + "instance": "string", + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "401": { + "description": "Authorization missing or invalid" + }, + "403": { + "description": "The provided credentials are not authorized to access this resource" + }, + "422": { + "description": "Client Error", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Returns.ValidationProblemDetails" + }, + "example": { + "detail": "string", + "errors": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + }, + "extensions": { + "property1": {}, + "property2": {} + }, + "instance": "string", + "status": 0, + "title": "string", + "type": "string" + } + } + } + } + }, + "requestBody": { + "x-name": "returns.CreateReturnViewModel", + "description": "Model defining the return", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Returns.CreateReturnViewModel" + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Returns" + ] + } + }, + "/return/{id}:cancel": { + "post": { + "summary": "Cancel Return Order\n", + "operationId": "029f09f17effabfd265e8a247d48ec04", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Id of the return order\n", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + }, + { + "name": "shipbob_channel_id", + "in": "header", + "required": true, + "description": "Channel Id for Operation\n", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Returns.ReturnOrderViewModel" + }, + "example": { + "channel": { + "id": 0, + "name": "ShipBobs-Shopify-Store" + }, + "completed_date": "2019-08-24T14:15:22Z", + "customer_name": "string", + "fulfillment_center": { + "id": 0, + "name": "Cicero (IL)" + }, + "id": 0, + "insert_date": "2019-08-24T14:15:22Z", + "inventory": [ + { + "action_requested": { + "action": "Default", + "action_type": "InventoryDefault", + "instructions": "string" + }, + "action_taken": [ + { + "action": "Default", + "action_reason": "string", + "lot_information": [ + { + "expiration_date": "2019-08-24T14:15:22Z", + "lot_number": "string", + "quantity_processed": 0 + } + ], + "quantity_processed": 1 + } + ], + "id": 0, + "name": "string", + "quantity": 0 + } + ], + "invoice_amount": 0.1, + "original_shipment_id": 0, + "reference_id": "string", + "return_type": "Regular", + "status": "AwaitingArrival", + "store_order_id": "string", + "tracking_number": "860C8CDC8F0B4FC7AB69AC86C20539EC", + "transactions": [ + { + "amount": 2.5, + "transaction_type": "ReturnLabelInvoice" + } + ] + } + } + } + }, + "401": { + "description": "Authorization missing or invalid" + }, + "403": { + "description": "The provided credentials are not authorized to access this resource" + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Returns.ValidationProblemDetails" + }, + "example": { + "detail": "string", + "errors": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + }, + "extensions": { + "property1": {}, + "property2": {} + }, + "instance": "string", + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "422": { + "description": "Client Error", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Returns.ValidationProblemDetails" + }, + "example": { + "detail": "string", + "errors": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + }, + "extensions": { + "property1": {}, + "property2": {} + }, + "instance": "string", + "status": 0, + "title": "string", + "type": "string" + } + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Returns" + ] + } + }, + "/fulfillment-center": { + "get": { + "summary": "Get Fulfillment Centers\n", + "operationId": "cfcf6f1549cfdc2bf1779a3a205bd64e", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.FulfillmentCenterViewModelArray" + }, + "example": [ + { + "address1": "5900 W Ogden Ave", + "address2": "Suite 100", + "city": "Cicero", + "country": "USA", + "email": "example@example.com", + "id": 0, + "name": "Cicero (IL)", + "phone_number": "555-555-5555", + "state": "IL", + "timezone": "Central Standard Time", + "zip_code": "60804" + } + ] + } + } + }, + "401": { + "description": "Authorization missing or invalid" + }, + "403": { + "description": "The provided credentials are not authorized to access this resource" + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Receiving" + ] + } + }, + "/receiving/{id}": { + "get": { + "summary": "Get Warehouse Receiving Order\n", + "operationId": "072a989bfe11161281fbfbbfb2aedf97", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Id of the receiving order\n", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.V2.WarehouseReceivingOrderViewModel" + }, + "example": { + "box_labels_uri": "https://api.shipbob.com/1.0/receiving/1/labels", + "box_packaging_type": "EverythingInOneBox", + "expected_arrival_date": "2019-08-24T14:15:22Z", + "external_sync_timestamp": "2019-08-24T14:15:22Z", + "fulfillment_center": { + "address1": "5900 W Ogden Ave", + "address2": "Suite 100", + "city": "Cicero", + "country": "USA", + "email": "example@example.com", + "id": 0, + "name": "Cicero (IL)", + "phone_number": "555-555-5555", + "state": "IL", + "timezone": "Central Standard Time", + "zip_code": "60804" + }, + "id": 0, + "insert_date": "2019-08-24T14:15:22Z", + "inventory_quantities": [ + { + "expected_quantity": 0, + "inventory_id": 0, + "received_quantity": 0, + "sku": "string", + "stowed_quantity": 0 + } + ], + "last_updated_date": "2019-08-24T14:15:22Z", + "package_type": "Package", + "purchase_order_number": "string", + "status": "Awaiting", + "status_history": [ + { + "id": 0, + "status": "Processing", + "timestamp": "2019-08-24T14:15:22Z" + } + ] + } + } + } + }, + "401": { + "description": "Authorization missing or invalid" + }, + "403": { + "description": "The provided credentials are not authorized to access this resource" + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.ValidationProblemDetails" + }, + "example": { + "detail": "string", + "errors": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + }, + "instance": "string", + "property1": {}, + "property2": {}, + "status": 0, + "title": "string", + "type": "string" + } + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Receiving" + ] + } + }, + "/receiving": { + "get": { + "summary": "Get Multiple Warehouse Receiving Orders\n", + "operationId": "10c13128d7c5683408869c462ab45747", + "parameters": [ + { + "name": "Page", + "in": "query", + "description": "Page of WROs to get\n", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + }, + { + "name": "Limit", + "in": "query", + "description": "Number of WROs per page to request\n", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + }, + { + "name": "IDs", + "in": "query", + "description": "Comma separated list of WRO IDs to filter by\n", + "schema": { + "type": "string", + "additionalProperties": false, + "items": { + "type": "integer", + "format": "int32", + "additionalProperties": false + } + } + }, + { + "name": "Statuses", + "in": "query", + "description": "Comma separated list of WRO statuses to filter by\n", + "schema": { + "type": "string", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.ReceivingStatus" + } + } + }, + { + "name": "InsertStartDate", + "in": "query", + "description": "Earliest date that a WRO was created\n", + "schema": { + "type": "string", + "format": "date-time", + "additionalProperties": false + } + }, + { + "name": "InsertEndDate", + "in": "query", + "description": "Latest date that a WRO was created\n", + "schema": { + "type": "string", + "format": "date-time", + "additionalProperties": false + } + }, + { + "name": "FulfillmentCenterIds", + "in": "query", + "description": "Comma separated list of WRO fulfillment center IDs to filter by\n", + "schema": { + "type": "string", + "additionalProperties": false, + "items": { + "type": "integer", + "format": "int32", + "additionalProperties": false + } + } + }, + { + "name": "PurchaseOrderNumbers", + "in": "query", + "description": "Comma separated list of WRO PO numbers to filter by\n", + "schema": { + "type": "string", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + { + "name": "ExternalSync", + "in": "query", + "description": "Flag to return external_sync_timestamp WROs\n", + "schema": { + "type": "boolean", + "additionalProperties": false + } + }, + { + "name": "CompletedStartDate", + "in": "query", + "description": "Earliest date that a WRO was completed\n", + "schema": { + "type": "string", + "format": "date-time", + "additionalProperties": false + } + }, + { + "name": "CompletedEndDate", + "in": "query", + "description": "Latest date that a WRO was completed\n", + "schema": { + "type": "string", + "format": "date-time", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "headers": { + "Page-Number": { + "description": "Number of the current page\n", + "schema": { + "type": "object", + "additionalProperties": false + } + }, + "Total-Pages": { + "description": "Total number of pages of results\n", + "schema": { + "type": "object", + "additionalProperties": false + } + }, + "Total-Count": { + "description": "Total number of results\n", + "schema": { + "type": "object", + "additionalProperties": false + } + }, + "Page-Size": { + "description": "Number of results per page\n", + "schema": { + "type": "object", + "additionalProperties": false + } + }, + "Next-Page": { + "description": "The href of the next page of results, if there is a next page\n", + "schema": { + "type": "object", + "additionalProperties": false + } + } + }, + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.V2.WarehouseReceivingOrderViewModelArray" + }, + "example": [ + { + "box_labels_uri": "https://api.shipbob.com/1.0/receiving/1/labels", + "box_packaging_type": "EverythingInOneBox", + "expected_arrival_date": "2019-08-24T14:15:22Z", + "external_sync_timestamp": "2019-08-24T14:15:22Z", + "fulfillment_center": { + "address1": "5900 W Ogden Ave", + "address2": "Suite 100", + "city": "Cicero", + "country": "USA", + "email": "example@example.com", + "id": 0, + "name": "Cicero (IL)", + "phone_number": "555-555-5555", + "state": "IL", + "timezone": "Central Standard Time", + "zip_code": "60804" + }, + "id": 0, + "insert_date": "2019-08-24T14:15:22Z", + "inventory_quantities": [ + { + "expected_quantity": 0, + "inventory_id": 0, + "received_quantity": 0, + "sku": "string", + "stowed_quantity": 0 + } + ], + "last_updated_date": "2019-08-24T14:15:22Z", + "package_type": "Package", + "purchase_order_number": "string", + "status": "Awaiting", + "status_history": [ + { + "id": 0, + "status": "Processing", + "timestamp": "2019-08-24T14:15:22Z" + } + ] + } + ] + } + } + }, + "401": { + "description": "Authorization missing or invalid" + }, + "403": { + "description": "The provided credentials are not authorized to access this resource" + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.ValidationProblemDetails" + }, + "example": { + "detail": "string", + "errors": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + }, + "instance": "string", + "property1": {}, + "property2": {}, + "status": 0, + "title": "string", + "type": "string" + } + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Receiving" + ] + }, + "post": { + "summary": "Create Warehouse Receiving Order\n", + "operationId": "85ab9844ebc2ac76db634108b022ff32", + "responses": { + "201": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.V2.WarehouseReceivingOrderViewModel" + }, + "example": { + "box_labels_uri": "https://api.shipbob.com/1.0/receiving/1/labels", + "box_packaging_type": "EverythingInOneBox", + "expected_arrival_date": "2019-08-24T14:15:22Z", + "external_sync_timestamp": "2019-08-24T14:15:22Z", + "fulfillment_center": { + "address1": "5900 W Ogden Ave", + "address2": "Suite 100", + "city": "Cicero", + "country": "USA", + "email": "example@example.com", + "id": 0, + "name": "Cicero (IL)", + "phone_number": "555-555-5555", + "state": "IL", + "timezone": "Central Standard Time", + "zip_code": "60804" + }, + "id": 0, + "insert_date": "2019-08-24T14:15:22Z", + "inventory_quantities": [ + { + "expected_quantity": 0, + "inventory_id": 0, + "received_quantity": 0, + "sku": "string", + "stowed_quantity": 0 + } + ], + "last_updated_date": "2019-08-24T14:15:22Z", + "package_type": "Package", + "purchase_order_number": "string", + "status": "Awaiting", + "status_history": [ + { + "id": 0, + "status": "Processing", + "timestamp": "2019-08-24T14:15:22Z" + } + ] + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.Post.2.0.Receiving.Bad.Request.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + }, + "401": { + "description": "Authorization missing or invalid" + }, + "403": { + "description": "The provided credentials are not authorized to access this resource" + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.ValidationProblemDetails" + }, + "example": { + "detail": "string", + "errors": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + }, + "instance": "string", + "property1": {}, + "property2": {}, + "status": 0, + "title": "string", + "type": "string" + } + } + } + } + }, + "requestBody": { + "x-name": "receiving.CreateReceivingOrderModel", + "description": "The receiving order to create", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.CreateReceivingOrderModel" + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Receiving" + ] + } + }, + "/receiving/{id}/labels": { + "get": { + "summary": "Get Warehouse Receiving Order Box Labels\n", + "operationId": "cbec9819f5c4be876e3dcaa0da85cdb2", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Id of the receiving order", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.Get.2.0.Receiving.Id.Labels.OK.String" + }, + "example": "string" + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.ValidationProblemDetails" + }, + "example": { + "detail": "string", + "errors": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + }, + "instance": "string", + "property1": {}, + "property2": {}, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "401": { + "description": "Authorization missing or invalid" + }, + "403": { + "description": "The provided credentials are not authorized to access this resource" + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.ValidationProblemDetails" + }, + "example": { + "detail": "string", + "errors": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + }, + "instance": "string", + "property1": {}, + "property2": {}, + "status": 0, + "title": "string", + "type": "string" + } + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Receiving" + ] + } + }, + "/receiving/{id}:cancel": { + "post": { + "summary": "Cancel Warehouse Receiving Order\n", + "operationId": "fd48aac656a1677b6a137403d3c7dcfd", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Id of the receiving order to cancel", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.V2.WarehouseReceivingOrderViewModel" + }, + "example": { + "box_labels_uri": "https://api.shipbob.com/1.0/receiving/1/labels", + "box_packaging_type": "EverythingInOneBox", + "expected_arrival_date": "2019-08-24T14:15:22Z", + "external_sync_timestamp": "2019-08-24T14:15:22Z", + "fulfillment_center": { + "address1": "5900 W Ogden Ave", + "address2": "Suite 100", + "city": "Cicero", + "country": "USA", + "email": "example@example.com", + "id": 0, + "name": "Cicero (IL)", + "phone_number": "555-555-5555", + "state": "IL", + "timezone": "Central Standard Time", + "zip_code": "60804" + }, + "id": 0, + "insert_date": "2019-08-24T14:15:22Z", + "inventory_quantities": [ + { + "expected_quantity": 0, + "inventory_id": 0, + "received_quantity": 0, + "sku": "string", + "stowed_quantity": 0 + } + ], + "last_updated_date": "2019-08-24T14:15:22Z", + "package_type": "Package", + "purchase_order_number": "string", + "status": "Awaiting", + "status_history": [ + { + "id": 0, + "status": "Processing", + "timestamp": "2019-08-24T14:15:22Z" + } + ] + } + } + } + }, + "401": { + "description": "Authorization missing or invalid" + }, + "403": { + "description": "The provided credentials are not authorized to access this resource" + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.ValidationProblemDetails" + }, + "example": { + "detail": "string", + "errors": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + }, + "instance": "string", + "property1": {}, + "property2": {}, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "422": { + "description": "Client Error", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.Post.2.0.Receiving.Id.Cancel.Unprocessable.Entity.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Receiving" + ] + } + }, + "/receiving:setExternalSync": { + "post": { + "summary": "Set ExternalSync flag for Wros\n", + "operationId": "87c43ca241c729ef7cf480743d698075", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.V2.WarehouseReceivingOrderViewModel" + }, + "example": { + "box_labels_uri": "https://api.shipbob.com/1.0/receiving/1/labels", + "box_packaging_type": "EverythingInOneBox", + "expected_arrival_date": "2019-08-24T14:15:22Z", + "external_sync_timestamp": "2019-08-24T14:15:22Z", + "fulfillment_center": { + "address1": "5900 W Ogden Ave", + "address2": "Suite 100", + "city": "Cicero", + "country": "USA", + "email": "example@example.com", + "id": 0, + "name": "Cicero (IL)", + "phone_number": "555-555-5555", + "state": "IL", + "timezone": "Central Standard Time", + "zip_code": "60804" + }, + "id": 0, + "insert_date": "2019-08-24T14:15:22Z", + "inventory_quantities": [ + { + "expected_quantity": 0, + "inventory_id": 0, + "received_quantity": 0, + "sku": "string", + "stowed_quantity": 0 + } + ], + "last_updated_date": "2019-08-24T14:15:22Z", + "package_type": "Package", + "purchase_order_number": "string", + "status": "Awaiting" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.Post.2.0.Receiving.Set.External.Sync.Bad.Request.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + }, + "401": { + "description": "Authorization missing or invalid" + }, + "403": { + "description": "The provided credentials are not authorized to access this resource" + } + }, + "requestBody": { + "x-name": "receiving.UpdateExternalSyncModel", + "description": "The list of wro ids and a flag to enable external sync", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.UpdateExternalSyncModel" + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Receiving" + ] + } + }, + "/receiving/{id}/boxes": { + "get": { + "summary": "Get Warehouse Receiving Order Boxes\n", + "operationId": "68137184cc716d056a7a3f336d0a9851", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Id of the receiving order", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.BoxViewModelArray" + }, + "example": [ + { + "arrived_date": "2019-08-24T14:15:22Z", + "box_id": 0, + "box_items": [ + { + "inventory_id": 0, + "lot_date": "2019-08-24T14:15:22Z", + "lot_number": "string", + "quantity": 0, + "received_quantity": 0, + "stowed_quantity": 0 + } + ], + "box_number": 0, + "box_status": "Awaiting", + "counting_started_date": "2019-08-24T14:15:22Z", + "received_date": "2019-08-24T14:15:22Z", + "tracking_number": "860C8CDC8F0B4FC7AB69AC86C20539EC" + } + ] + } + } + }, + "401": { + "description": "Authorization missing or invalid" + }, + "403": { + "description": "The provided credentials are not authorized to access this resource" + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.ValidationProblemDetails" + }, + "example": { + "detail": "string", + "errors": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + }, + "instance": "string", + "property1": {}, + "property2": {}, + "status": 0, + "title": "string", + "type": "string" + } + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Receiving" + ] + } + }, + "/shipment/{shipmentId}/logs": { + "get": { + "summary": "Get logs for one Shipment by Shipment Id", + "operationId": "aefaa6a540d93e2dea0584a6fb69fad5", + "parameters": [ + { + "name": "shipmentId", + "in": "path", + "required": true, + "description": "The shipment id to get", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + }, + { + "name": "shipbob_channel_id", + "in": "header", + "description": "Channel Id for Operation", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.ShipmentLogViewModelArray" + }, + "example": [ + { + "log_type_id": 0, + "log_type_name": "string", + "log_type_text": "string", + "metadata": { + "property1": "string", + "property2": "string" + }, + "timestamp": "2019-08-24T14:15:22Z" + } + ] + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Get.Api.Shipment.ShipmentId.Logs.Bad.Request.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + }, + "401": { + "description": "No access right at this time" + }, + "403": { + "description": "No access" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Orders" + ] + } + }, + "/order/{orderId}/shipment/{shipmentId}/logs": { + "get": { + "summary": "Get logs for one Shipment by Order Id and Shipment Id", + "operationId": "6930420ba86513c3cfa5f0af2ad98526", + "parameters": [ + { + "name": "orderId", + "in": "path", + "required": true, + "description": "The order id to get the shipment for", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + }, + { + "name": "shipmentId", + "in": "path", + "required": true, + "description": "The shipment id to get", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + }, + { + "name": "shipbob_channel_id", + "in": "header", + "description": "Channel Id for Operation", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.ShipmentLogViewModelArray" + }, + "example": [ + { + "log_type_id": 0, + "log_type_name": "string", + "log_type_text": "string", + "metadata": { + "property1": "string", + "property2": "string" + }, + "timestamp": "2019-08-24T14:15:22Z" + } + ] + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Get.Api.Order.OrderId.Shipment.ShipmentId.Logs.Bad.Request.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + }, + "401": { + "description": "No access right at this time" + }, + "403": { + "description": "No access" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Orders" + ] + } + }, + "/order": { + "post": { + "summary": "Create Order", + "operationId": "014d459354b1309064ac8ab6993c7394", + "parameters": [ + { + "name": "shipbob_channel_id", + "in": "header", + "required": true, + "description": "Channel Id for Operation", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + } + ], + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.OrderViewModel" + }, + "example": { + "channel": { + "id": 0, + "name": "ShipBobs-Shopify-Store" + }, + "created_date": "2019-08-24T14:15:22Z", + "financials": { + "total_price": 0.1 + }, + "gift_message": "string", + "id": 0, + "order_number": "string", + "products": [ + { + "external_line_id": 0, + "gtin": "string", + "id": 0, + "quantity": 0, + "quantity_unit_of_measure_code": "string", + "reference_id": "TShirtBlueM", + "sku": "TShirtBlueM", + "unit_price": 0.1, + "upc": "string" + } + ], + "purchase_date": "2019-08-24T14:15:22Z", + "recipient": { + "address": { + "address1": "100 Nowhere Blvd", + "address2": "Suite 100", + "city": "Gotham City", + "company_name": "Wayne Enterprises", + "country": "US", + "state": "NJ", + "zip_code": "07093" + }, + "email": "john@example.com", + "name": "John Doe", + "phone_number": "555-555-5555" + }, + "reference_id": "string", + "retailer_program_data": { + "addresses": [ + { + "address1": "100 Nowhere Blvd", + "address2": "Suite 100", + "city": "Gotham City", + "company_name": "Wayne Enterprises", + "country": "US", + "state": "NJ", + "type": "MarkFor", + "zip_code": "07093" + } + ], + "customer_ticket_number": "string", + "delivery_date": "2019-08-24T14:15:22Z", + "department": "string", + "doNotShipBeforeDate": "2019-08-24T14:15:22Z", + "mark_for_store": "string", + "purchase_order_number": "string", + "retailer_program_type": "string", + "shipByDate": "2019-08-24T14:15:22Z" + }, + "shipments": [ + { + "actual_fulfillment_date": "2019-08-24T14:15:22Z", + "created_date": "2019-08-24T14:15:22Z", + "delivery_date": "2019-08-24T14:15:22Z", + "estimated_fulfillment_date": "2019-08-24T14:15:22Z", + "estimated_fulfillment_date_status": "AwaitingInventoryAllocation", + "gift_message": "string", + "id": 0, + "insurance_value": 0, + "invoice_amount": 0, + "invoice_currency_code": "string", + "is_tracking_uploaded": true, + "last_tracking_update_at": "2019-08-24T14:15:22Z", + "last_update_at": "2019-08-24T14:15:22Z", + "location": { + "id": 0, + "name": "Cicero (IL)" + }, + "measurements": { + "depth_in": 0, + "length_in": 0, + "total_weight_oz": 0, + "width_in": 0 + }, + "order_id": 0, + "package_material_type": "Unknown", + "parent_cartons": [ + { + "barcode": "string", + "cartons": [ + { + "barcode": "string", + "carton_details": [ + { + "products": [ + { + "id": 0, + "inventory_items": [ + { + "expiration_date": "2019-08-24T14:15:22Z", + "id": 0, + "is_dangerous_goods": true, + "lot": "22222", + "name": "Medium Blue T-Shirt", + "quantity": 0, + "quantity_committed": 0, + "serial_numbers": [ + "string" + ] + } + ], + "name": "Medium Blue T-Shirt", + "reference_id": "TShirtBlueM", + "sku": "TShirtBlueM" + } + ] + } + ], + "id": 0, + "measurements": { + "depth_in": 0.1, + "length_in": 0.1, + "total_weight_oz": 0.1, + "width_in": 0.1 + }, + "type": "Box or pallet" + } + ], + "measurements": { + "depth_in": 0.1, + "length_in": 0.1, + "total_weight_oz": 0.1, + "width_in": 0.1 + }, + "type": "Box or pallet" + } + ], + "products": [ + { + "id": 0, + "inventory_items": [ + { + "expiration_date": "2019-08-24T14:15:22Z", + "id": 0, + "is_dangerous_goods": true, + "lot": "22222", + "name": "Medium Blue T-Shirt", + "quantity": 0, + "quantity_committed": 0, + "serial_numbers": [ + "string" + ] + } + ], + "name": "Medium Blue T-Shirt", + "reference_id": "TShirtBlueM", + "sku": "TShirtBlueM" + } + ], + "recipient": { + "address": { + "address1": "100 Nowhere Blvd", + "address2": "Suite 100", + "city": "Gotham City", + "company_name": "Wayne Enterprises", + "country": "US", + "state": "NJ", + "zip_code": "07093" + }, + "email": "john@example.com", + "full_name": "John Doe", + "name": "John Doe", + "phone_number": "555-555-5555" + }, + "reference_id": "string", + "require_signature": true, + "ship_option": "Standard", + "status": "None", + "status_details": [ + { + "description": "string", + "exception_fulfillment_center_id": 0, + "extra_information": { + "validation_messages": [ + "string" + ] + }, + "id": 0, + "inventory_id": 0, + "name": "string" + } + ], + "tracking": { + "bol": "string", + "carrier": "USPS", + "carrier_service": "Priority", + "pro_number": "string", + "scac": "string", + "shipping_date": "2019-08-24T14:15:22Z", + "tracking_number": "860C8CDC8F0B4FC7AB69AC86C20539EC", + "tracking_url": "https://www.example.com/tracking?id=860C8CDC8F0B4FC7AB69AC86C20539EC" + } + } + ], + "shipping_method": "Free 2-day Shipping", + "shipping_terms": { + "carrier_type": "Parcel", + "payment_term": "Collect" + }, + "status": "Processing", + "tags": [ + { + "name": "Handling instructions", + "value": "Fragile" + } + ], + "type": "DTC" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Post.Api.Order.Bad.Request.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + }, + "401": { + "description": "No access right at this time" + }, + "403": { + "description": "No access" + }, + "422": { + "description": "Client Error", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Post.Api.Order.Unprocessable.Entity.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + } + }, + "requestBody": { + "x-name": "orders.CreateOrderModel", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.CreateOrderModel" + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Orders" + ] + }, + "get": { + "summary": "Get Orders", + "description": "All parameters are AND filters", + "operationId": "b104a65e90eefe2b42929142ce7c1b99", + "parameters": [ + { + "name": "Page", + "in": "query", + "description": "Page of orders to get", + "schema": { + "type": "number", + "format": "int32", + "maximum": 2147483647.0, + "minimum": 1.0, + "additionalProperties": false + } + }, + { + "name": "Limit", + "in": "query", + "description": "Amount of orders per page to request", + "schema": { + "type": "number", + "format": "int32", + "maximum": 250.0, + "minimum": 1.0, + "additionalProperties": false + } + }, + { + "name": "IDs", + "in": "query", + "description": "order ids to filter by, comma separated
Example: ?IDs=1,2", + "schema": { + "type": "string", + "additionalProperties": false, + "items": { + "type": "integer", + "format": "int32", + "additionalProperties": false + } + } + }, + { + "name": "ReferenceIds", + "in": "query", + "description": "Reference ids to filter by, comma separated
Example: ?ReferenceIds=Ref1,Ref2", + "schema": { + "type": "string", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + { + "name": "StartDate", + "in": "query", + "description": "Start date to filter orders inserted later than", + "schema": { + "type": "string", + "format": "date-time", + "additionalProperties": false + } + }, + { + "name": "EndDate", + "in": "query", + "description": "End date to filter orders inserted earlier than", + "schema": { + "type": "string", + "format": "date-time", + "additionalProperties": false + } + }, + { + "name": "SortOrder", + "in": "query", + "description": "Order to sort results in", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "HasTracking", + "in": "query", + "description": "Has any portion of this order been assigned a tracking number", + "schema": { + "type": "boolean", + "additionalProperties": false + } + }, + { + "name": "LastUpdateStartDate", + "in": "query", + "description": "Start date to filter orders updated later than", + "schema": { + "type": "string", + "format": "date-time", + "additionalProperties": false + } + }, + { + "name": "LastUpdateEndDate", + "in": "query", + "description": "End date to filter orders updated later than", + "schema": { + "type": "string", + "format": "date-time", + "additionalProperties": false + } + }, + { + "name": "IsTrackingUploaded", + "in": "query", + "description": "Filter orders that their tracking information was fully uploaded", + "schema": { + "type": "boolean", + "additionalProperties": false + } + }, + { + "name": "LastTrackingUpdateStartDate", + "in": "query", + "description": "Start date to filter orders with tracking updates later than the supplied date. Will only return orders that have tracking information", + "schema": { + "type": "string", + "format": "date-time", + "additionalProperties": false + } + }, + { + "name": "LastTrackingUpdateEndDate", + "in": "query", + "description": "End date to filter orders updated later than the supplied date. Will only return orders that have tracking information", + "schema": { + "type": "string", + "format": "date-time", + "additionalProperties": false + } + }, + { + "name": "shipbob_channel_id", + "in": "header", + "description": "Channel Id for Operation", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.OrderViewModelArray" + }, + "example": [ + { + "channel": { + "id": 0, + "name": "ShipBobs-Shopify-Store" + }, + "created_date": "2019-08-24T14:15:22Z", + "financials": { + "total_price": 0.1 + }, + "gift_message": "string", + "id": 0, + "order_number": "string", + "products": [ + { + "external_line_id": 0, + "gtin": "string", + "id": 0, + "quantity": 0, + "quantity_unit_of_measure_code": "string", + "reference_id": "TShirtBlueM", + "sku": "TShirtBlueM", + "unit_price": 0.1, + "upc": "string" + } + ], + "purchase_date": "2019-08-24T14:15:22Z", + "recipient": { + "address": { + "address1": "100 Nowhere Blvd", + "address2": "Suite 100", + "city": "Gotham City", + "company_name": "Wayne Enterprises", + "country": "US", + "state": "NJ", + "zip_code": "07093" + }, + "email": "john@example.com", + "name": "John Doe", + "phone_number": "555-555-5555" + }, + "reference_id": "string", + "retailer_program_data": { + "addresses": [ + { + "address1": "100 Nowhere Blvd", + "address2": "Suite 100", + "city": "Gotham City", + "company_name": "Wayne Enterprises", + "country": "US", + "state": "NJ", + "type": "MarkFor", + "zip_code": "07093" + } + ], + "customer_ticket_number": "string", + "delivery_date": "2019-08-24T14:15:22Z", + "department": "string", + "doNotShipBeforeDate": "2019-08-24T14:15:22Z", + "mark_for_store": "string", + "purchase_order_number": "string", + "retailer_program_type": "string", + "shipByDate": "2019-08-24T14:15:22Z" + }, + "shipments": [ + { + "actual_fulfillment_date": "2019-08-24T14:15:22Z", + "created_date": "2019-08-24T14:15:22Z", + "delivery_date": "2019-08-24T14:15:22Z", + "estimated_fulfillment_date": "2019-08-24T14:15:22Z", + "estimated_fulfillment_date_status": "AwaitingInventoryAllocation", + "gift_message": "string", + "id": 0, + "insurance_value": 0, + "invoice_amount": 0, + "invoice_currency_code": "string", + "is_tracking_uploaded": true, + "last_tracking_update_at": "2019-08-24T14:15:22Z", + "last_update_at": "2019-08-24T14:15:22Z", + "location": { + "id": 0, + "name": "Cicero (IL)" + }, + "measurements": { + "depth_in": 0, + "length_in": 0, + "total_weight_oz": 0, + "width_in": 0 + }, + "order_id": 0, + "package_material_type": "Unknown", + "parent_cartons": [ + { + "barcode": "string", + "cartons": [ + { + "barcode": "string", + "carton_details": [ + { + "products": [ + { + "id": 0, + "inventory_items": [ + { + "expiration_date": "2019-08-24T14:15:22Z", + "id": 0, + "is_dangerous_goods": true, + "lot": "22222", + "name": "Medium Blue T-Shirt", + "quantity": 0, + "quantity_committed": 0, + "serial_numbers": [ + null + ] + } + ], + "name": "Medium Blue T-Shirt", + "reference_id": "TShirtBlueM", + "sku": "TShirtBlueM" + } + ] + } + ], + "id": 0, + "measurements": { + "depth_in": 0.1, + "length_in": 0.1, + "total_weight_oz": 0.1, + "width_in": 0.1 + }, + "type": "Box or pallet" + } + ], + "measurements": { + "depth_in": 0.1, + "length_in": 0.1, + "total_weight_oz": 0.1, + "width_in": 0.1 + }, + "type": "Box or pallet" + } + ], + "products": [ + { + "id": 0, + "inventory_items": [ + { + "expiration_date": "2019-08-24T14:15:22Z", + "id": 0, + "is_dangerous_goods": true, + "lot": "22222", + "name": "Medium Blue T-Shirt", + "quantity": 0, + "quantity_committed": 0, + "serial_numbers": [ + "string" + ] + } + ], + "name": "Medium Blue T-Shirt", + "reference_id": "TShirtBlueM", + "sku": "TShirtBlueM" + } + ], + "recipient": { + "address": { + "address1": "100 Nowhere Blvd", + "address2": "Suite 100", + "city": "Gotham City", + "company_name": "Wayne Enterprises", + "country": "US", + "state": "NJ", + "zip_code": "07093" + }, + "email": "john@example.com", + "full_name": "John Doe", + "name": "John Doe", + "phone_number": "555-555-5555" + }, + "reference_id": "string", + "require_signature": true, + "ship_option": "Standard", + "status": "None", + "status_details": [ + { + "description": "string", + "exception_fulfillment_center_id": 0, + "extra_information": { + "validation_messages": [ + "string" + ] + }, + "id": 0, + "inventory_id": 0, + "name": "string" + } + ], + "tracking": { + "bol": "string", + "carrier": "USPS", + "carrier_service": "Priority", + "pro_number": "string", + "scac": "string", + "shipping_date": "2019-08-24T14:15:22Z", + "tracking_number": "860C8CDC8F0B4FC7AB69AC86C20539EC", + "tracking_url": "https://www.example.com/tracking?id=860C8CDC8F0B4FC7AB69AC86C20539EC" + } + } + ], + "shipping_method": "Free 2-day Shipping", + "shipping_terms": { + "carrier_type": "Parcel", + "payment_term": "Collect" + }, + "status": "Processing", + "tags": [ + { + "name": "Handling instructions", + "value": "Fragile" + } + ], + "type": "DTC" + } + ] + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Get.Api.Order.Bad.Request.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + }, + "401": { + "description": "No access right at this time" + }, + "403": { + "description": "No access" + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Orders" + ] + } + }, + "/order/{orderId}/shipment/{shipmentId}": { + "get": { + "summary": "Get one Shipment by Order Id and Shipment Id", + "operationId": "4a91e4ebbcfdf842cefb9a16c69cd278", + "parameters": [ + { + "name": "orderId", + "in": "path", + "required": true, + "description": "The order id to get the shipment for", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + }, + { + "name": "shipmentId", + "in": "path", + "required": true, + "description": "The shipment id to get", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + }, + { + "name": "shipbob_channel_id", + "in": "header", + "description": "Channel Id for Operation", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Get.Api.Order.OrderId.Shipment.ShipmentId.OK.OneOf.ShipmentViewModel.InternalShipmentViewModel" + }, + "example": { + "actual_fulfillment_date": "2019-08-24T14:15:22Z", + "created_date": "2019-08-24T14:15:22Z", + "delivery_date": "2019-08-24T14:15:22Z", + "estimated_fulfillment_date": "2019-08-24T14:15:22Z", + "estimated_fulfillment_date_status": "AwaitingInventoryAllocation", + "gift_message": "string", + "id": 0, + "insurance_value": 0, + "invoice_amount": 0, + "invoice_currency_code": "string", + "is_tracking_uploaded": true, + "last_tracking_update_at": "2019-08-24T14:15:22Z", + "last_update_at": "2019-08-24T14:15:22Z", + "location": { + "id": 0, + "name": "Cicero (IL)" + }, + "measurements": { + "depth_in": 0, + "length_in": 0, + "total_weight_oz": 0, + "width_in": 0 + }, + "order_id": 0, + "package_material_type": "Unknown", + "parent_cartons": [ + { + "barcode": "string", + "cartons": [ + { + "barcode": "string", + "carton_details": [ + { + "products": [ + { + "id": 0, + "inventory_items": [ + { + "expiration_date": "2019-08-24T14:15:22Z", + "id": 0, + "is_dangerous_goods": true, + "lot": "22222", + "name": "Medium Blue T-Shirt", + "quantity": 0, + "quantity_committed": 0, + "serial_numbers": [ + "string" + ] + } + ], + "name": "Medium Blue T-Shirt", + "reference_id": "TShirtBlueM", + "sku": "TShirtBlueM" + } + ] + } + ], + "id": 0, + "measurements": { + "depth_in": 0.1, + "length_in": 0.1, + "total_weight_oz": 0.1, + "width_in": 0.1 + }, + "type": "Box or pallet" + } + ], + "measurements": { + "depth_in": 0.1, + "length_in": 0.1, + "total_weight_oz": 0.1, + "width_in": 0.1 + }, + "type": "Box or pallet" + } + ], + "products": [ + { + "id": 0, + "inventory_items": [ + { + "expiration_date": "2019-08-24T14:15:22Z", + "id": 0, + "is_dangerous_goods": true, + "lot": "22222", + "name": "Medium Blue T-Shirt", + "quantity": 0, + "quantity_committed": 0, + "serial_numbers": [ + "string" + ] + } + ], + "name": "Medium Blue T-Shirt", + "reference_id": "TShirtBlueM", + "sku": "TShirtBlueM" + } + ], + "recipient": { + "address": { + "address1": "100 Nowhere Blvd", + "address2": "Suite 100", + "city": "Gotham City", + "company_name": "Wayne Enterprises", + "country": "US", + "state": "NJ", + "zip_code": "07093" + }, + "email": "john@example.com", + "full_name": "John Doe", + "name": "John Doe", + "phone_number": "555-555-5555" + }, + "reference_id": "string", + "require_signature": true, + "ship_option": "Standard", + "status": "None", + "status_details": [ + { + "description": "string", + "exception_fulfillment_center_id": 0, + "extra_information": { + "validation_messages": [ + "string" + ] + }, + "id": 0, + "inventory_id": 0, + "name": "string" + } + ], + "tracking": { + "bol": "string", + "carrier": "USPS", + "carrier_service": "Priority", + "pro_number": "string", + "scac": "string", + "shipping_date": "2019-08-24T14:15:22Z", + "tracking_number": "860C8CDC8F0B4FC7AB69AC86C20539EC", + "tracking_url": "https://www.example.com/tracking?id=860C8CDC8F0B4FC7AB69AC86C20539EC" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Get.Api.Order.OrderId.Shipment.ShipmentId.Bad.Request.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + }, + "401": { + "description": "No access right at this time" + }, + "403": { + "description": "No access" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Orders" + ] + } + }, + "/order/{orderId}/shipment/{shipmentId}/timeline": { + "get": { + "summary": "Get one Shipment's status timeline by Order Id and Shipment Id", + "operationId": "46a877cb09f66372f7381c7086049150", + "parameters": [ + { + "name": "orderId", + "in": "path", + "required": true, + "description": "The order id to get the shipment for", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + }, + { + "name": "shipmentId", + "in": "path", + "required": true, + "description": "The shipment id to get", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + }, + { + "name": "shipbob_channel_id", + "in": "header", + "description": "Channel Id for Operation", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.ShipmentLogViewModelArray" + }, + "example": [ + { + "log_type_id": 0, + "log_type_name": "string", + "log_type_text": "string", + "metadata": { + "property1": "string", + "property2": "string" + }, + "timestamp": "2019-08-24T14:15:22Z" + } + ] + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Get.Api.Order.OrderId.Shipment.ShipmentId.Timeline.Bad.Request.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + }, + "401": { + "description": "No access right at this time" + }, + "403": { + "description": "No access" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Orders" + ] + } + }, + "/shipment/{shipmentId}": { + "get": { + "summary": "Get one Shipment by Shipment Id", + "operationId": "8c8639205c363bf5fcc5b147c40ccfe5", + "parameters": [ + { + "name": "shipmentId", + "in": "path", + "required": true, + "description": "The shipment id to get", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + }, + { + "name": "shipbob_channel_id", + "in": "header", + "description": "Channel Id for Operation", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Get.Api.Shipment.ShipmentId.OK.OneOf.ShipmentViewModel.InternalShipmentViewModel" + }, + "example": { + "actual_fulfillment_date": "2019-08-24T14:15:22Z", + "created_date": "2019-08-24T14:15:22Z", + "delivery_date": "2019-08-24T14:15:22Z", + "estimated_fulfillment_date": "2019-08-24T14:15:22Z", + "estimated_fulfillment_date_status": "AwaitingInventoryAllocation", + "gift_message": "string", + "id": 0, + "insurance_value": 0, + "invoice_amount": 0, + "invoice_currency_code": "string", + "is_tracking_uploaded": true, + "last_tracking_update_at": "2019-08-24T14:15:22Z", + "last_update_at": "2019-08-24T14:15:22Z", + "location": { + "id": 0, + "name": "Cicero (IL)" + }, + "measurements": { + "depth_in": 0, + "length_in": 0, + "total_weight_oz": 0, + "width_in": 0 + }, + "order_id": 0, + "package_material_type": "Unknown", + "parent_cartons": [ + { + "barcode": "string", + "cartons": [ + { + "barcode": "string", + "carton_details": [ + { + "products": [ + { + "id": 0, + "inventory_items": [ + { + "expiration_date": "2019-08-24T14:15:22Z", + "id": 0, + "is_dangerous_goods": true, + "lot": "22222", + "name": "Medium Blue T-Shirt", + "quantity": 0, + "quantity_committed": 0, + "serial_numbers": [ + "string" + ] + } + ], + "name": "Medium Blue T-Shirt", + "reference_id": "TShirtBlueM", + "sku": "TShirtBlueM" + } + ] + } + ], + "id": 0, + "measurements": { + "depth_in": 0.1, + "length_in": 0.1, + "total_weight_oz": 0.1, + "width_in": 0.1 + }, + "type": "Box or pallet" + } + ], + "measurements": { + "depth_in": 0.1, + "length_in": 0.1, + "total_weight_oz": 0.1, + "width_in": 0.1 + }, + "type": "Box or pallet" + } + ], + "products": [ + { + "id": 0, + "inventory_items": [ + { + "expiration_date": "2019-08-24T14:15:22Z", + "id": 0, + "is_dangerous_goods": true, + "lot": "22222", + "name": "Medium Blue T-Shirt", + "quantity": 0, + "quantity_committed": 0, + "serial_numbers": [ + "string" + ] + } + ], + "name": "Medium Blue T-Shirt", + "reference_id": "TShirtBlueM", + "sku": "TShirtBlueM" + } + ], + "recipient": { + "address": { + "address1": "100 Nowhere Blvd", + "address2": "Suite 100", + "city": "Gotham City", + "company_name": "Wayne Enterprises", + "country": "US", + "state": "NJ", + "zip_code": "07093" + }, + "email": "john@example.com", + "full_name": "John Doe", + "name": "John Doe", + "phone_number": "555-555-5555" + }, + "reference_id": "string", + "require_signature": true, + "ship_option": "Standard", + "status": "None", + "status_details": [ + { + "description": "string", + "exception_fulfillment_center_id": 0, + "extra_information": { + "validation_messages": [ + "string" + ] + }, + "id": 0, + "inventory_id": 0, + "name": "string" + } + ], + "tracking": { + "bol": "string", + "carrier": "USPS", + "carrier_service": "Priority", + "pro_number": "string", + "scac": "string", + "shipping_date": "2019-08-24T14:15:22Z", + "tracking_number": "860C8CDC8F0B4FC7AB69AC86C20539EC", + "tracking_url": "https://www.example.com/tracking?id=860C8CDC8F0B4FC7AB69AC86C20539EC" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Get.Api.Shipment.ShipmentId.Bad.Request.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + }, + "401": { + "description": "No access right at this time" + }, + "403": { + "description": "No access" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Orders" + ] + } + }, + "/shipment/{shipmentId}/timeline": { + "get": { + "summary": "Get one Shipment's status timeline by Shipment Id", + "operationId": "92be75123ea13c356384d555d0863147", + "parameters": [ + { + "name": "shipmentId", + "in": "path", + "required": true, + "description": "The shipment id to get", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + }, + { + "name": "shipbob_channel_id", + "in": "header", + "description": "Channel Id for Operation", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.ShipmentLogViewModelArray" + }, + "example": [ + { + "log_type_id": 0, + "log_type_name": "string", + "log_type_text": "string", + "metadata": { + "property1": "string", + "property2": "string" + }, + "timestamp": "2019-08-24T14:15:22Z" + } + ] + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Get.Api.Shipment.ShipmentId.Timeline.Bad.Request.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + }, + "401": { + "description": "No access right at this time" + }, + "403": { + "description": "No access" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Orders" + ] + } + }, + "/order/{orderId}/shipment": { + "get": { + "summary": "Get all Shipments for Order", + "operationId": "1e0815dcfb1c817c448dfd569dbe8c21", + "parameters": [ + { + "name": "orderId", + "in": "path", + "required": true, + "description": "The order id to get shipments for", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + }, + { + "name": "shipbob_channel_id", + "in": "header", + "description": "Channel Id for Operation", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Get.Api.Order.OrderId.Shipment.OK.OneOfArray" + }, + "example": [ + { + "actual_fulfillment_date": "2019-08-24T14:15:22Z", + "created_date": "2019-08-24T14:15:22Z", + "delivery_date": "2019-08-24T14:15:22Z", + "estimated_fulfillment_date": "2019-08-24T14:15:22Z", + "estimated_fulfillment_date_status": "AwaitingInventoryAllocation", + "gift_message": "string", + "id": 0, + "insurance_value": 0, + "invoice_amount": 0, + "invoice_currency_code": "string", + "is_tracking_uploaded": true, + "last_tracking_update_at": "2019-08-24T14:15:22Z", + "last_update_at": "2019-08-24T14:15:22Z", + "location": { + "id": 0, + "name": "Cicero (IL)" + }, + "measurements": { + "depth_in": 0, + "length_in": 0, + "total_weight_oz": 0, + "width_in": 0 + }, + "order_id": 0, + "package_material_type": "Unknown", + "parent_cartons": [ + { + "barcode": "string", + "cartons": [ + { + "barcode": "string", + "carton_details": [ + { + "products": [ + { + "id": 0, + "inventory_items": [ + { + "expiration_date": "2019-08-24T14:15:22Z", + "id": 0, + "is_dangerous_goods": true, + "lot": "22222", + "name": "Medium Blue T-Shirt", + "quantity": 0, + "quantity_committed": 0, + "serial_numbers": [ + "string" + ] + } + ], + "name": "Medium Blue T-Shirt", + "reference_id": "TShirtBlueM", + "sku": "TShirtBlueM" + } + ] + } + ], + "id": 0, + "measurements": { + "depth_in": 0.1, + "length_in": 0.1, + "total_weight_oz": 0.1, + "width_in": 0.1 + }, + "type": "Box or pallet" + } + ], + "measurements": { + "depth_in": 0.1, + "length_in": 0.1, + "total_weight_oz": 0.1, + "width_in": 0.1 + }, + "type": "Box or pallet" + } + ], + "products": [ + { + "id": 0, + "inventory_items": [ + { + "expiration_date": "2019-08-24T14:15:22Z", + "id": 0, + "is_dangerous_goods": true, + "lot": "22222", + "name": "Medium Blue T-Shirt", + "quantity": 0, + "quantity_committed": 0, + "serial_numbers": [ + "string" + ] + } + ], + "name": "Medium Blue T-Shirt", + "reference_id": "TShirtBlueM", + "sku": "TShirtBlueM" + } + ], + "recipient": { + "address": { + "address1": "100 Nowhere Blvd", + "address2": "Suite 100", + "city": "Gotham City", + "company_name": "Wayne Enterprises", + "country": "US", + "state": "NJ", + "zip_code": "07093" + }, + "email": "john@example.com", + "full_name": "John Doe", + "name": "John Doe", + "phone_number": "555-555-5555" + }, + "reference_id": "string", + "require_signature": true, + "ship_option": "Standard", + "status": "None", + "status_details": [ + { + "description": "string", + "exception_fulfillment_center_id": 0, + "extra_information": { + "validation_messages": [ + "string" + ] + }, + "id": 0, + "inventory_id": 0, + "name": "string" + } + ], + "tracking": { + "bol": "string", + "carrier": "USPS", + "carrier_service": "Priority", + "pro_number": "string", + "scac": "string", + "shipping_date": "2019-08-24T14:15:22Z", + "tracking_number": "860C8CDC8F0B4FC7AB69AC86C20539EC", + "tracking_url": "https://www.example.com/tracking?id=860C8CDC8F0B4FC7AB69AC86C20539EC" + } + } + ] + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Get.Api.Order.OrderId.Shipment.Bad.Request.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + }, + "401": { + "description": "No access right at this time" + }, + "403": { + "description": "No access" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Orders" + ] + } + }, + "/order/{orderId}": { + "get": { + "summary": "Get Order", + "operationId": "ec2804df94cd56f5f33114c7b1475772", + "parameters": [ + { + "name": "orderId", + "in": "path", + "required": true, + "description": "", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + }, + { + "name": "shipbob_channel_id", + "in": "header", + "description": "Channel Id for Operation", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.OrderViewModel" + }, + "example": { + "channel": { + "id": 0, + "name": "ShipBobs-Shopify-Store" + }, + "created_date": "2019-08-24T14:15:22Z", + "financials": { + "total_price": 0.1 + }, + "gift_message": "string", + "id": 0, + "order_number": "string", + "products": [ + { + "external_line_id": 0, + "gtin": "string", + "id": 0, + "quantity": 0, + "quantity_unit_of_measure_code": "string", + "reference_id": "TShirtBlueM", + "sku": "TShirtBlueM", + "unit_price": 0.1, + "upc": "string" + } + ], + "purchase_date": "2019-08-24T14:15:22Z", + "recipient": { + "address": { + "address1": "100 Nowhere Blvd", + "address2": "Suite 100", + "city": "Gotham City", + "company_name": "Wayne Enterprises", + "country": "US", + "state": "NJ", + "zip_code": "07093" + }, + "email": "john@example.com", + "name": "John Doe", + "phone_number": "555-555-5555" + }, + "reference_id": "string", + "retailer_program_data": { + "addresses": [ + { + "address1": "100 Nowhere Blvd", + "address2": "Suite 100", + "city": "Gotham City", + "company_name": "Wayne Enterprises", + "country": "US", + "state": "NJ", + "type": "MarkFor", + "zip_code": "07093" + } + ], + "customer_ticket_number": "string", + "delivery_date": "2019-08-24T14:15:22Z", + "department": "string", + "doNotShipBeforeDate": "2019-08-24T14:15:22Z", + "mark_for_store": "string", + "purchase_order_number": "string", + "retailer_program_type": "string", + "shipByDate": "2019-08-24T14:15:22Z" + }, + "shipments": [ + { + "actual_fulfillment_date": "2019-08-24T14:15:22Z", + "created_date": "2019-08-24T14:15:22Z", + "delivery_date": "2019-08-24T14:15:22Z", + "estimated_fulfillment_date": "2019-08-24T14:15:22Z", + "estimated_fulfillment_date_status": "AwaitingInventoryAllocation", + "gift_message": "string", + "id": 0, + "insurance_value": 0, + "invoice_amount": 0, + "invoice_currency_code": "string", + "is_tracking_uploaded": true, + "last_tracking_update_at": "2019-08-24T14:15:22Z", + "last_update_at": "2019-08-24T14:15:22Z", + "location": { + "id": 0, + "name": "Cicero (IL)" + }, + "measurements": { + "depth_in": 0, + "length_in": 0, + "total_weight_oz": 0, + "width_in": 0 + }, + "order_id": 0, + "package_material_type": "Unknown", + "parent_cartons": [ + { + "barcode": "string", + "cartons": [ + { + "barcode": "string", + "carton_details": [ + { + "products": [ + { + "id": 0, + "inventory_items": [ + { + "expiration_date": "2019-08-24T14:15:22Z", + "id": 0, + "is_dangerous_goods": true, + "lot": "22222", + "name": "Medium Blue T-Shirt", + "quantity": 0, + "quantity_committed": 0, + "serial_numbers": [ + "string" + ] + } + ], + "name": "Medium Blue T-Shirt", + "reference_id": "TShirtBlueM", + "sku": "TShirtBlueM" + } + ] + } + ], + "id": 0, + "measurements": { + "depth_in": 0.1, + "length_in": 0.1, + "total_weight_oz": 0.1, + "width_in": 0.1 + }, + "type": "Box or pallet" + } + ], + "measurements": { + "depth_in": 0.1, + "length_in": 0.1, + "total_weight_oz": 0.1, + "width_in": 0.1 + }, + "type": "Box or pallet" + } + ], + "products": [ + { + "id": 0, + "inventory_items": [ + { + "expiration_date": "2019-08-24T14:15:22Z", + "id": 0, + "is_dangerous_goods": true, + "lot": "22222", + "name": "Medium Blue T-Shirt", + "quantity": 0, + "quantity_committed": 0, + "serial_numbers": [ + "string" + ] + } + ], + "name": "Medium Blue T-Shirt", + "reference_id": "TShirtBlueM", + "sku": "TShirtBlueM" + } + ], + "recipient": { + "address": { + "address1": "100 Nowhere Blvd", + "address2": "Suite 100", + "city": "Gotham City", + "company_name": "Wayne Enterprises", + "country": "US", + "state": "NJ", + "zip_code": "07093" + }, + "email": "john@example.com", + "full_name": "John Doe", + "name": "John Doe", + "phone_number": "555-555-5555" + }, + "reference_id": "string", + "require_signature": true, + "ship_option": "Standard", + "status": "None", + "status_details": [ + { + "description": "string", + "exception_fulfillment_center_id": 0, + "extra_information": { + "validation_messages": [ + "string" + ] + }, + "id": 0, + "inventory_id": 0, + "name": "string" + } + ], + "tracking": { + "bol": "string", + "carrier": "USPS", + "carrier_service": "Priority", + "pro_number": "string", + "scac": "string", + "shipping_date": "2019-08-24T14:15:22Z", + "tracking_number": "860C8CDC8F0B4FC7AB69AC86C20539EC", + "tracking_url": "https://www.example.com/tracking?id=860C8CDC8F0B4FC7AB69AC86C20539EC" + } + } + ], + "shipping_method": "Free 2-day Shipping", + "shipping_terms": { + "carrier_type": "Parcel", + "payment_term": "Collect" + }, + "status": "Processing", + "tags": [ + { + "name": "Handling instructions", + "value": "Fragile" + } + ], + "type": "DTC" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Get.Api.Order.OrderId.Bad.Request.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + }, + "401": { + "description": "No access right at this time" + }, + "403": { + "description": "No access" + }, + "404": { + "description": "Not Found" + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Orders" + ] + } + }, + "/location": { + "get": { + "summary": "Get locations\n", + "operationId": "e2b9a3ad50680b3e2ab41cb8636790e4", + "parameters": [ + { + "name": "IncludeInactive", + "in": "query", + "description": "Whether the inactive locations should be included or not\n", + "schema": { + "type": "boolean", + "additionalProperties": false + } + }, + { + "name": "ReceivingEnabled", + "in": "query", + "description": "Return all the receiving enabled locations\n", + "schema": { + "type": "boolean", + "additionalProperties": false + } + }, + { + "name": "AccessGranted", + "in": "query", + "description": "Return all the access granted locations\n", + "schema": { + "type": "boolean", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Locations.Get.1.0.Location.OK.OneOfArray" + }, + "example": [ + { + "abbreviation": "string", + "access_granted": true, + "attributes": [ + "string" + ], + "id": 0, + "is_active": true, + "is_receiving_enabled": true, + "is_shipping_enabled": true, + "name": "string", + "region": { + "id": 0, + "name": "string" + }, + "services": [ + { + "address": { + "address1": "string", + "address2": "string", + "city": "string", + "country": "string", + "email": "string", + "name": "string", + "phone_number": "string", + "state": "string", + "zip_code": "string" + }, + "enabled": true, + "service_type": "Receiving" + } + ], + "timezone": "string" + } + ] + } + } + }, + "401": { + "description": "Authorization missing or invalid" + }, + "403": { + "description": "The provided credentials are not authorized to access this resource" + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Locations" + ] + } + }, + "/packaging-requirement": { + "get": { + "summary": "Gets Packaging Requirement\n", + "operationId": "672942b09322e1990e33ef572188ad73", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.PackagingRequirementViewModelArray" + }, + "example": [ + { + "applicable_categories": [ + { + "id": 0, + "sub_category_ids": [ + 0 + ] + } + ], + "applicable_packaging_material_types": [ + { + "id": 0, + "name": "string" + } + ], + "applicable_taxonomy": [ + "string" + ], + "description": "string", + "id": 0, + "name": "string" + } + ] + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Products" + ] + } + }, + "/variant/{variantId}:merge": { + "post": { + "summary": "Used to merge two or more variants together\n", + "operationId": "089b4461bf637cc52135f10eaf8f02a9", + "parameters": [ + { + "name": "variantId", + "in": "path", + "required": true, + "description": "The ID of the variant to use as the merge target\n", + "schema": { + "type": "string", + "format": "int64", + "additionalProperties": false + } + } + ], + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ProductViewModelV5" + }, + "example": { + "created_on": "2019-08-24T14:15:22Z", + "id": 0, + "name": "string", + "taxonomy": { + "id": 0, + "name": "string", + "parent_id": 0, + "parent_name": "string", + "path": "string" + }, + "type": "string", + "updated_on": "2019-08-24T14:15:22Z", + "user_id": 0, + "variants": [ + { + "additional_hazmat_attributes": { + "charge_state_percentage": 0.1, + "container_metal": true, + "container_type": "string", + "lithium_battery_packaging": "string", + "lithium_battery_type": "string", + "magnet": true, + "net_volume": 0.1, + "net_weight": 0.1 + }, + "associated_bundles": [ + { + "product_id": 0, + "product_name": "string", + "quantity": 0, + "variant_id": 0, + "variant_sku": "string" + } + ], + "barcodes": [ + { + "sticker_url": "string", + "value": "string" + } + ], + "bundle_definition": [ + { + "product_id": 0, + "quantity": 0, + "variant_id": 0, + "variant_name": "string", + "variant_sku": "string" + } + ], + "channel_metadata": [ + { + "channel_id": 0, + "channel_name": "string", + "currency": "string", + "id": 0, + "is_inventory_sync_enabled": true, + "legacy_product_id": 0, + "platform": "string", + "platform_identifier": "string", + "platform_inventory_item_id": "string", + "price": 0.1, + "seller_sku": "string" + } + ], + "created_on": "2019-08-24T14:15:22Z", + "customs": { + "country_code_of_origin": "string", + "currency": "string", + "description": "string", + "hs_tariff_code": "string", + "is321_eligible": true, + "value": 0 + }, + "dimension": { + "height": 0.1, + "is_locked": true, + "length": 0.1, + "source": "string", + "unit": "string", + "width": 0.1 + }, + "fulfillment_settings": { + "dangerous_goods": true, + "is_bpm_parcel": true, + "is_case_pick": true, + "msds_url": "string", + "requires_prop65": true, + "serial_scan": { + "exact_character_length": 0, + "is_enabled": true, + "prefix": "string", + "suffix": "string" + } + }, + "gtin": "string", + "id": 0, + "inventory": { + "inventory_id": 0, + "on_hand_qty": 0 + }, + "is_digital": true, + "is_image_uploaded": true, + "lot_information": { + "is_lot": true, + "minimum_shelf_life_days": 0 + }, + "merge_children": [ + { + "channel_ids": [ + 0 + ], + "completed_at": "2019-08-24T14:15:22Z", + "inventory_id": 0, + "variant_id": 0, + "variant_name": "string" + } + ], + "name": "string", + "packaging_material_type": { + "id": 0, + "name": "string" + }, + "packaging_requirement": { + "id": 0, + "name": "string" + }, + "return_preferences": { + "backup_action": { + "id": 0, + "name": "string" + }, + "instructions": "string", + "primary_action": { + "id": 0, + "name": "string" + }, + "return_to_sender_backup_action": { + "id": 0, + "name": "string" + }, + "return_to_sender_primary_action": { + "id": 0, + "name": "string" + } + }, + "reviews_pending": [ + "string" + ], + "sku": "string", + "status": "string", + "upc": "string", + "updated_on": "2019-08-24T14:15:22Z", + "weight": { + "unit": "string", + "weight": 0.1 + } + } + ] + } + } + } + } + }, + "requestBody": { + "x-name": "products.MergeVariantRequestModelArray", + "description": "The variants that should be merged to the target variant", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.MergeVariantRequestModelArray" + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Products" + ] + } + }, + "/taxonomy/{id}/parent": { + "get": { + "summary": " Gets Taxonomy Parent\n", + "operationId": "09c013ed682b50f3d16234d4c69f519b", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.TaxonomyViewModel" + }, + "example": { + "children": [ + { + "has_children": true, + "id": 0, + "name": "string", + "path": "string" + } + ], + "id": 0, + "name": "string", + "parent": { + "id": 0, + "name": "string", + "path": "string" + }, + "path": "string" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.Get.Api.V5.Taxonomy.Id.Parent.Unauthorized.OneOf.ProblemDetails.HttpValidationProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.Get.Api.V5.Taxonomy.Id.Parent.Forbidden.OneOf.ProblemDetails.HttpValidationProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.Get.Api.V5.Taxonomy.Id.Parent.Not.Found.OneOf.ProblemDetails.HttpValidationProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "500": { + "description": "Server Error" + }, + "503": { + "description": "Server Error" + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Products" + ] + } + }, + "/product/{productId}": { + "patch": { + "summary": "Update a single product with Json Merge Patch functionality\n", + "description": "Updates a single product. This endpoint supports Json Merge Patch functionality, which allows partial updates to be made to the product. The endpoint will only update the fields that are provided in the request. For updating variants, you mnust include the ID of the variant that you would like to update.\n", + "operationId": "2dd7afd0ffe30df53fe295964e471abc", + "parameters": [ + { + "name": "productId", + "in": "path", + "required": true, + "description": "The product identifier\n", + "schema": { + "type": "string", + "format": "int64", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ProductViewModelV5" + }, + "example": { + "created_on": "2019-08-24T14:15:22Z", + "id": 0, + "name": "string", + "taxonomy": { + "id": 0, + "name": "string", + "parent_id": 0, + "parent_name": "string", + "path": "string" + }, + "type": "string", + "updated_on": "2019-08-24T14:15:22Z", + "user_id": 0, + "variants": [ + { + "additional_hazmat_attributes": { + "charge_state_percentage": 0.1, + "container_metal": true, + "container_type": "string", + "lithium_battery_packaging": "string", + "lithium_battery_type": "string", + "magnet": true, + "net_volume": 0.1, + "net_weight": 0.1 + }, + "associated_bundles": [ + { + "product_id": 0, + "product_name": "string", + "quantity": 0, + "variant_id": 0, + "variant_sku": "string" + } + ], + "barcodes": [ + { + "sticker_url": "string", + "value": "string" + } + ], + "bundle_definition": [ + { + "product_id": 0, + "quantity": 0, + "variant_id": 0, + "variant_name": "string", + "variant_sku": "string" + } + ], + "channel_metadata": [ + { + "channel_id": 0, + "channel_name": "string", + "currency": "string", + "id": 0, + "is_inventory_sync_enabled": true, + "legacy_product_id": 0, + "platform": "string", + "platform_identifier": "string", + "platform_inventory_item_id": "string", + "price": 0.1, + "seller_sku": "string" + } + ], + "created_on": "2019-08-24T14:15:22Z", + "customs": { + "country_code_of_origin": "string", + "currency": "string", + "description": "string", + "hs_tariff_code": "string", + "is321_eligible": true, + "value": 0 + }, + "dimension": { + "height": 0.1, + "is_locked": true, + "length": 0.1, + "source": "string", + "unit": "string", + "width": 0.1 + }, + "fulfillment_settings": { + "dangerous_goods": true, + "is_bpm_parcel": true, + "is_case_pick": true, + "msds_url": "string", + "requires_prop65": true, + "serial_scan": { + "exact_character_length": 0, + "is_enabled": true, + "prefix": "string", + "suffix": "string" + } + }, + "gtin": "string", + "id": 0, + "inventory": { + "inventory_id": 0, + "on_hand_qty": 0 + }, + "is_digital": true, + "is_image_uploaded": true, + "lot_information": { + "is_lot": true, + "minimum_shelf_life_days": 0 + }, + "merge_children": [ + { + "channel_ids": [ + 0 + ], + "completed_at": "2019-08-24T14:15:22Z", + "inventory_id": 0, + "variant_id": 0, + "variant_name": "string" + } + ], + "name": "string", + "packaging_material_type": { + "id": 0, + "name": "string" + }, + "packaging_requirement": { + "id": 0, + "name": "string" + }, + "return_preferences": { + "backup_action": { + "id": 0, + "name": "string" + }, + "instructions": "string", + "primary_action": { + "id": 0, + "name": "string" + }, + "return_to_sender_backup_action": { + "id": 0, + "name": "string" + }, + "return_to_sender_primary_action": { + "id": 0, + "name": "string" + } + }, + "reviews_pending": [ + "string" + ], + "sku": "string", + "status": "string", + "upc": "string", + "updated_on": "2019-08-24T14:15:22Z", + "weight": { + "unit": "string", + "weight": 0.1 + } + } + ] + } + } + } + } + }, + "requestBody": { + "x-name": "products.UpdateProductRequestModelV5", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.UpdateProductRequestModelV5" + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Products" + ] + }, + "get": { + "summary": " Gets Product by Id\n", + "operationId": "9d82d40f4758612d28c98612ce997deb", + "parameters": [ + { + "name": "productId", + "in": "path", + "required": true, + "description": "", + "schema": { + "type": "string", + "format": "int64", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ProductViewModelV5" + }, + "example": { + "created_on": "2019-08-24T14:15:22Z", + "id": 0, + "name": "string", + "taxonomy": { + "id": 0, + "name": "string", + "parent_id": 0, + "parent_name": "string", + "path": "string" + }, + "type": "string", + "updated_on": "2019-08-24T14:15:22Z", + "user_id": 0, + "variants": [ + { + "additional_hazmat_attributes": { + "charge_state_percentage": 0.1, + "container_metal": true, + "container_type": "string", + "lithium_battery_packaging": "string", + "lithium_battery_type": "string", + "magnet": true, + "net_volume": 0.1, + "net_weight": 0.1 + }, + "associated_bundles": [ + { + "product_id": 0, + "product_name": "string", + "quantity": 0, + "variant_id": 0, + "variant_sku": "string" + } + ], + "barcodes": [ + { + "sticker_url": "string", + "value": "string" + } + ], + "bundle_definition": [ + { + "product_id": 0, + "quantity": 0, + "variant_id": 0, + "variant_name": "string", + "variant_sku": "string" + } + ], + "channel_metadata": [ + { + "channel_id": 0, + "channel_name": "string", + "currency": "string", + "id": 0, + "is_inventory_sync_enabled": true, + "legacy_product_id": 0, + "platform": "string", + "platform_identifier": "string", + "platform_inventory_item_id": "string", + "price": 0.1, + "seller_sku": "string" + } + ], + "created_on": "2019-08-24T14:15:22Z", + "customs": { + "country_code_of_origin": "string", + "currency": "string", + "description": "string", + "hs_tariff_code": "string", + "is321_eligible": true, + "value": 0 + }, + "dimension": { + "height": 0.1, + "is_locked": true, + "length": 0.1, + "source": "string", + "unit": "string", + "width": 0.1 + }, + "fulfillment_settings": { + "dangerous_goods": true, + "is_bpm_parcel": true, + "is_case_pick": true, + "msds_url": "string", + "requires_prop65": true, + "serial_scan": { + "exact_character_length": 0, + "is_enabled": true, + "prefix": "string", + "suffix": "string" + } + }, + "gtin": "string", + "id": 0, + "inventory": { + "inventory_id": 0, + "on_hand_qty": 0 + }, + "is_digital": true, + "is_image_uploaded": true, + "lot_information": { + "is_lot": true, + "minimum_shelf_life_days": 0 + }, + "merge_children": [ + { + "channel_ids": [ + 0 + ], + "completed_at": "2019-08-24T14:15:22Z", + "inventory_id": 0, + "variant_id": 0, + "variant_name": "string" + } + ], + "name": "string", + "packaging_material_type": { + "id": 0, + "name": "string" + }, + "packaging_requirement": { + "id": 0, + "name": "string" + }, + "return_preferences": { + "backup_action": { + "id": 0, + "name": "string" + }, + "instructions": "string", + "primary_action": { + "id": 0, + "name": "string" + }, + "return_to_sender_backup_action": { + "id": 0, + "name": "string" + }, + "return_to_sender_primary_action": { + "id": 0, + "name": "string" + } + }, + "reviews_pending": [ + "string" + ], + "sku": "string", + "status": "string", + "upc": "string", + "updated_on": "2019-08-24T14:15:22Z", + "weight": { + "unit": "string", + "weight": 0.1 + } + } + ] + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.Get.Api.V5.Product.ProductId.Bad.Request.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.Get.Api.V5.Product.ProductId.Not.Found.OneOf.ProblemDetails.HttpValidationProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Products" + ] + }, + "delete": { + "summary": "Deletes Bundle and removes associations to related products\n", + "operationId": "dff42dc941ad7015e0ef589a5df04a41", + "parameters": [ + { + "name": "productId", + "in": "path", + "required": true, + "description": "The product identifier\n", + "schema": { + "type": "string", + "format": "int64", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.Delete.Api.V5.Product.ProductId.Bad.Request.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.Delete.Api.V5.Product.ProductId.Not.Found.OneOf.ProblemDetails.HttpValidationProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Products" + ] + } + }, + "/product/{productId}:moveVariants": { + "post": { + "summary": "Migrates variants to existing product\n", + "operationId": "a3869424cb29a4540a3c8890462b4704", + "parameters": [ + { + "name": "productId", + "in": "path", + "required": true, + "description": "", + "schema": { + "type": "string", + "format": "int64", + "additionalProperties": false + } + } + ], + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ProductViewModel" + }, + "example": { + "category": { + "id": 0, + "name": "string" + }, + "created_on": "2019-08-24T14:15:22Z", + "id": 0, + "name": "string", + "sub_category": { + "id": 0, + "name": "string" + }, + "taxonomy": { + "id": 0, + "name": "string", + "parent_id": 0, + "parent_name": "string", + "path": "string" + }, + "type": "string", + "updated_on": "2019-08-24T14:15:22Z", + "user_id": 0, + "variants": [ + { + "additional_hazmat_attributes": { + "charge_state_percentage": 0.1, + "container_metal": true, + "container_type": "string", + "lithium_battery_packaging": "string", + "lithium_battery_type": "string", + "magnet": true, + "net_volume": 0.1, + "net_weight": 0.1 + }, + "associated_bundles": [ + { + "product_id": 0, + "product_name": "string", + "quantity": 0, + "variant_id": 0, + "variant_sku": "string" + } + ], + "barcode": "string", + "barcode_sticker_url": "string", + "bundle_definition": [ + { + "product_id": 0, + "quantity": 0, + "variant_id": 0, + "variant_name": "string", + "variant_sku": "string" + } + ], + "channel_metadata": [ + { + "channel_id": 0, + "channel_name": "string", + "currency": "string", + "id": 0, + "is_inventory_sync_enabled": true, + "legacy_product_id": 0, + "platform": "string", + "platform_identifier": "string", + "platform_inventory_item_id": "string", + "price": 0.1, + "seller_sku": "string" + } + ], + "created_on": "2019-08-24T14:15:22Z", + "customs": { + "country_code_of_origin": "string", + "currency": "string", + "description": "string", + "hs_tariff_code": "string", + "is321_eligible": true, + "value": 0 + }, + "dimension": { + "height": 0.1, + "is_locked": true, + "length": 0.1, + "source": "string", + "unit": "string", + "width": 0.1 + }, + "fulfillment_settings": { + "dangerous_goods": true, + "is_bpm_parcel": true, + "is_case_pick": true, + "msds_url": "string", + "requires_prop65": true, + "serial_scan": { + "exact_character_length": 0, + "is_enabled": true, + "prefix": "string", + "suffix": "string" + } + }, + "gtin": "string", + "id": 0, + "inventory": { + "inventory_id": 0, + "on_hand_qty": 0 + }, + "is_digital": true, + "is_image_uploaded": true, + "lot_information": { + "is_lot": true, + "minimum_shelf_life_days": 0 + }, + "merge_children": [ + { + "channel_ids": [ + 0 + ], + "completed_at": "2019-08-24T14:15:22Z", + "inventory_id": 0, + "variant_id": 0, + "variant_name": "string" + } + ], + "name": "string", + "packaging_material_type": { + "id": 0, + "name": "string" + }, + "packaging_requirement": { + "id": 0, + "name": "string" + }, + "return_preferences": { + "backup_action": { + "id": 0, + "name": "string" + }, + "instructions": "string", + "primary_action": { + "id": 0, + "name": "string" + }, + "return_to_sender_backup_action": { + "id": 0, + "name": "string" + }, + "return_to_sender_primary_action": { + "id": 0, + "name": "string" + } + }, + "reviews_pending": [ + "string" + ], + "sku": "string", + "status": "string", + "upc": "string", + "updated_on": "2019-08-24T14:15:22Z", + "weight": { + "unit": "string", + "weight": 0.1 + } + } + ] + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.Post.Api.V5.Product.ProductId.MoveVariants.Bad.Request.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.Post.Api.V5.Product.ProductId.MoveVariants.Not.Found.OneOf.ProblemDetails.HttpValidationProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + } + }, + "requestBody": { + "x-name": "products.MigrateVariantRequestModel", + "description": "Migration definition", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.MigrateVariantRequestModel" + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Products" + ] + } + }, + "/variant/{variantId}:convertToBundle": { + "post": { + "summary": "Add new product variants to a product\n", + "operationId": "0386f51f54514a8488c3b7e914220aba", + "parameters": [ + { + "name": "variantId", + "in": "path", + "required": true, + "description": "", + "schema": { + "type": "string", + "format": "int64", + "additionalProperties": false + } + } + ], + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ProductViewModelV5" + }, + "example": { + "created_on": "2019-08-24T14:15:22Z", + "id": 0, + "name": "string", + "taxonomy": { + "id": 0, + "name": "string", + "parent_id": 0, + "parent_name": "string", + "path": "string" + }, + "type": "string", + "updated_on": "2019-08-24T14:15:22Z", + "user_id": 0, + "variants": [ + { + "additional_hazmat_attributes": { + "charge_state_percentage": 0.1, + "container_metal": true, + "container_type": "string", + "lithium_battery_packaging": "string", + "lithium_battery_type": "string", + "magnet": true, + "net_volume": 0.1, + "net_weight": 0.1 + }, + "associated_bundles": [ + { + "product_id": 0, + "product_name": "string", + "quantity": 0, + "variant_id": 0, + "variant_sku": "string" + } + ], + "barcodes": [ + { + "sticker_url": "string", + "value": "string" + } + ], + "bundle_definition": [ + { + "product_id": 0, + "quantity": 0, + "variant_id": 0, + "variant_name": "string", + "variant_sku": "string" + } + ], + "channel_metadata": [ + { + "channel_id": 0, + "channel_name": "string", + "currency": "string", + "id": 0, + "is_inventory_sync_enabled": true, + "legacy_product_id": 0, + "platform": "string", + "platform_identifier": "string", + "platform_inventory_item_id": "string", + "price": 0.1, + "seller_sku": "string" + } + ], + "created_on": "2019-08-24T14:15:22Z", + "customs": { + "country_code_of_origin": "string", + "currency": "string", + "description": "string", + "hs_tariff_code": "string", + "is321_eligible": true, + "value": 0 + }, + "dimension": { + "height": 0.1, + "is_locked": true, + "length": 0.1, + "source": "string", + "unit": "string", + "width": 0.1 + }, + "fulfillment_settings": { + "dangerous_goods": true, + "is_bpm_parcel": true, + "is_case_pick": true, + "msds_url": "string", + "requires_prop65": true, + "serial_scan": { + "exact_character_length": 0, + "is_enabled": true, + "prefix": "string", + "suffix": "string" + } + }, + "gtin": "string", + "id": 0, + "inventory": { + "inventory_id": 0, + "on_hand_qty": 0 + }, + "is_digital": true, + "is_image_uploaded": true, + "lot_information": { + "is_lot": true, + "minimum_shelf_life_days": 0 + }, + "merge_children": [ + { + "channel_ids": [ + 0 + ], + "completed_at": "2019-08-24T14:15:22Z", + "inventory_id": 0, + "variant_id": 0, + "variant_name": "string" + } + ], + "name": "string", + "packaging_material_type": { + "id": 0, + "name": "string" + }, + "packaging_requirement": { + "id": 0, + "name": "string" + }, + "return_preferences": { + "backup_action": { + "id": 0, + "name": "string" + }, + "instructions": "string", + "primary_action": { + "id": 0, + "name": "string" + }, + "return_to_sender_backup_action": { + "id": 0, + "name": "string" + }, + "return_to_sender_primary_action": { + "id": 0, + "name": "string" + } + }, + "reviews_pending": [ + "string" + ], + "sku": "string", + "status": "string", + "upc": "string", + "updated_on": "2019-08-24T14:15:22Z", + "weight": { + "unit": "string", + "weight": 0.1 + } + } + ] + } + } + } + } + }, + "requestBody": { + "x-name": "products.ConvertVariantToBundleRequest", + "description": "The variant request that is to be converted to bundle", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ConvertVariantToBundleRequest" + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Products" + ] + } + }, + "/taxonomy/{id}": { + "get": { + "summary": " Gets Taxonomy by Id\n", + "operationId": "45c19cd89efa4b89bc9c93f3d443f77c", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.TaxonomyViewModel" + }, + "example": { + "children": [ + { + "has_children": true, + "id": 0, + "name": "string", + "path": "string" + } + ], + "id": 0, + "name": "string", + "parent": { + "id": 0, + "name": "string", + "path": "string" + }, + "path": "string" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.Get.Api.V5.Taxonomy.Id.Unauthorized.OneOf.ProblemDetails.HttpValidationProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.Get.Api.V5.Taxonomy.Id.Forbidden.OneOf.ProblemDetails.HttpValidationProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.Get.Api.V5.Taxonomy.Id.Not.Found.OneOf.ProblemDetails.HttpValidationProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "500": { + "description": "Server Error" + }, + "503": { + "description": "Server Error" + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Products" + ] + } + }, + "/variant/{variantId}/channel-metadata/{channelMetadataId}": { + "put": { + "summary": "Update specific channel metadata record from a variant by channel metadata ID\n", + "operationId": "90aa9021b19d7789681a49b76d79703d", + "parameters": [ + { + "name": "variantId", + "in": "path", + "required": true, + "description": "The ID of the variant to update the metadata from\n", + "schema": { + "type": "string", + "format": "int64", + "additionalProperties": false + } + }, + { + "name": "channelMetadataId", + "in": "path", + "required": true, + "description": "The ID of the channel metadata record to update\n", + "schema": { + "type": "string", + "format": "int64", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.VariantViewModelV5" + }, + "example": { + "additional_hazmat_attributes": { + "charge_state_percentage": 0.1, + "container_metal": true, + "container_type": "string", + "lithium_battery_packaging": "string", + "lithium_battery_type": "string", + "magnet": true, + "net_volume": 0.1, + "net_weight": 0.1 + }, + "associated_bundles": [ + { + "product_id": 0, + "product_name": "string", + "quantity": 0, + "variant_id": 0, + "variant_sku": "string" + } + ], + "barcodes": [ + { + "sticker_url": "string", + "value": "string" + } + ], + "bundle_definition": [ + { + "product_id": 0, + "quantity": 0, + "variant_id": 0, + "variant_name": "string", + "variant_sku": "string" + } + ], + "channel_metadata": [ + { + "channel_id": 0, + "channel_name": "string", + "currency": "string", + "id": 0, + "is_inventory_sync_enabled": true, + "legacy_product_id": 0, + "platform": "string", + "platform_identifier": "string", + "platform_inventory_item_id": "string", + "price": 0.1, + "seller_sku": "string" + } + ], + "created_on": "2019-08-24T14:15:22Z", + "customs": { + "country_code_of_origin": "string", + "currency": "string", + "description": "string", + "hs_tariff_code": "string", + "is321_eligible": true, + "value": 0 + }, + "dimension": { + "height": 0.1, + "is_locked": true, + "length": 0.1, + "source": "string", + "unit": "string", + "width": 0.1 + }, + "fulfillment_settings": { + "dangerous_goods": true, + "is_bpm_parcel": true, + "is_case_pick": true, + "msds_url": "string", + "requires_prop65": true, + "serial_scan": { + "exact_character_length": 0, + "is_enabled": true, + "prefix": "string", + "suffix": "string" + } + }, + "gtin": "string", + "id": 0, + "inventory": { + "inventory_id": 0, + "on_hand_qty": 0 + }, + "is_digital": true, + "is_image_uploaded": true, + "lot_information": { + "is_lot": true, + "minimum_shelf_life_days": 0 + }, + "merge_children": [ + { + "channel_ids": [ + 0 + ], + "completed_at": "2019-08-24T14:15:22Z", + "inventory_id": 0, + "variant_id": 0, + "variant_name": "string" + } + ], + "name": "string", + "packaging_material_type": { + "id": 0, + "name": "string" + }, + "packaging_requirement": { + "id": 0, + "name": "string" + }, + "return_preferences": { + "backup_action": { + "id": 0, + "name": "string" + }, + "instructions": "string", + "primary_action": { + "id": 0, + "name": "string" + }, + "return_to_sender_backup_action": { + "id": 0, + "name": "string" + }, + "return_to_sender_primary_action": { + "id": 0, + "name": "string" + } + }, + "reviews_pending": [ + "string" + ], + "sku": "string", + "status": "string", + "upc": "string", + "updated_on": "2019-08-24T14:15:22Z", + "weight": { + "unit": "string", + "weight": 0.1 + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.Put.Api.V5.Variant.VariantId.Channel.Metadata.ChannelMetadataId.Bad.Request.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.Put.Api.V5.Variant.VariantId.Channel.Metadata.ChannelMetadataId.Not.Found.OneOf.ProblemDetails.HttpValidationProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + } + }, + "requestBody": { + "x-name": "products.Put.Api.V5.Variant.VariantId.Channel.Metadata.ChannelMetadataId.Request.OneOf.AmazonChannelMetadataRequestModel.BaseChannelMetadataRequestModel.BigCommerceChannelMetadataRequestModel.ShopifyChannelMetadataRequestModel", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.Put.Api.V5.Variant.VariantId.Channel.Metadata.ChannelMetadataId.Request.OneOf.AmazonChannelMetadataRequestModel.BaseChannelMetadataRequestModel.BigCommerceChannelMetadataRequestModel.ShopifyChannelMetadataRequestModel" + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Products" + ] + }, + "delete": { + "summary": "Used to delete a specific channel metadata record from a variant by channel metadata ID\n", + "operationId": "b48e74188d2b119e672f2ea93f9b96c6", + "parameters": [ + { + "name": "variantId", + "in": "path", + "required": true, + "description": "The ID of the variant to remove the metadata from\n", + "schema": { + "type": "string", + "format": "int64", + "additionalProperties": false + } + }, + { + "name": "channelMetadataId", + "in": "path", + "required": true, + "description": "The ID of the channel metadata record to delete\n", + "schema": { + "type": "string", + "format": "int64", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.VariantViewModelV5" + }, + "example": { + "additional_hazmat_attributes": { + "charge_state_percentage": 0.1, + "container_metal": true, + "container_type": "string", + "lithium_battery_packaging": "string", + "lithium_battery_type": "string", + "magnet": true, + "net_volume": 0.1, + "net_weight": 0.1 + }, + "associated_bundles": [ + { + "product_id": 0, + "product_name": "string", + "quantity": 0, + "variant_id": 0, + "variant_sku": "string" + } + ], + "barcodes": [ + { + "sticker_url": "string", + "value": "string" + } + ], + "bundle_definition": [ + { + "product_id": 0, + "quantity": 0, + "variant_id": 0, + "variant_name": "string", + "variant_sku": "string" + } + ], + "channel_metadata": [ + { + "channel_id": 0, + "channel_name": "string", + "currency": "string", + "id": 0, + "is_inventory_sync_enabled": true, + "legacy_product_id": 0, + "platform": "string", + "platform_identifier": "string", + "platform_inventory_item_id": "string", + "price": 0.1, + "seller_sku": "string" + } + ], + "created_on": "2019-08-24T14:15:22Z", + "customs": { + "country_code_of_origin": "string", + "currency": "string", + "description": "string", + "hs_tariff_code": "string", + "is321_eligible": true, + "value": 0 + }, + "dimension": { + "height": 0.1, + "is_locked": true, + "length": 0.1, + "source": "string", + "unit": "string", + "width": 0.1 + }, + "fulfillment_settings": { + "dangerous_goods": true, + "is_bpm_parcel": true, + "is_case_pick": true, + "msds_url": "string", + "requires_prop65": true, + "serial_scan": { + "exact_character_length": 0, + "is_enabled": true, + "prefix": "string", + "suffix": "string" + } + }, + "gtin": "string", + "id": 0, + "inventory": { + "inventory_id": 0, + "on_hand_qty": 0 + }, + "is_digital": true, + "is_image_uploaded": true, + "lot_information": { + "is_lot": true, + "minimum_shelf_life_days": 0 + }, + "merge_children": [ + { + "channel_ids": [ + 0 + ], + "completed_at": "2019-08-24T14:15:22Z", + "inventory_id": 0, + "variant_id": 0, + "variant_name": "string" + } + ], + "name": "string", + "packaging_material_type": { + "id": 0, + "name": "string" + }, + "packaging_requirement": { + "id": 0, + "name": "string" + }, + "return_preferences": { + "backup_action": { + "id": 0, + "name": "string" + }, + "instructions": "string", + "primary_action": { + "id": 0, + "name": "string" + }, + "return_to_sender_backup_action": { + "id": 0, + "name": "string" + }, + "return_to_sender_primary_action": { + "id": 0, + "name": "string" + } + }, + "reviews_pending": [ + "string" + ], + "sku": "string", + "status": "string", + "upc": "string", + "updated_on": "2019-08-24T14:15:22Z", + "weight": { + "unit": "string", + "weight": 0.1 + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.Delete.Api.V5.Variant.VariantId.Channel.Metadata.ChannelMetadataId.Bad.Request.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.Delete.Api.V5.Variant.VariantId.Channel.Metadata.ChannelMetadataId.Not.Found.OneOf.ProblemDetails.HttpValidationProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Products" + ] + } + }, + "/variant/{variantId}/channel-metadata": { + "post": { + "summary": "Create a new Channel Metadata Entry for a given Variant\n", + "operationId": "16bdf05dd87417fa58047a46bb481f61", + "parameters": [ + { + "name": "variantId", + "in": "path", + "required": true, + "description": "", + "schema": { + "type": "string", + "format": "int64", + "additionalProperties": false + } + } + ], + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ProductViewModelV5" + }, + "example": { + "created_on": "2019-08-24T14:15:22Z", + "id": 0, + "name": "string", + "taxonomy": { + "id": 0, + "name": "string", + "parent_id": 0, + "parent_name": "string", + "path": "string" + }, + "type": "string", + "updated_on": "2019-08-24T14:15:22Z", + "user_id": 0, + "variants": [ + { + "additional_hazmat_attributes": { + "charge_state_percentage": 0.1, + "container_metal": true, + "container_type": "string", + "lithium_battery_packaging": "string", + "lithium_battery_type": "string", + "magnet": true, + "net_volume": 0.1, + "net_weight": 0.1 + }, + "associated_bundles": [ + { + "product_id": 0, + "product_name": "string", + "quantity": 0, + "variant_id": 0, + "variant_sku": "string" + } + ], + "barcodes": [ + { + "sticker_url": "string", + "value": "string" + } + ], + "bundle_definition": [ + { + "product_id": 0, + "quantity": 0, + "variant_id": 0, + "variant_name": "string", + "variant_sku": "string" + } + ], + "channel_metadata": [ + { + "channel_id": 0, + "channel_name": "string", + "currency": "string", + "id": 0, + "is_inventory_sync_enabled": true, + "legacy_product_id": 0, + "platform": "string", + "platform_identifier": "string", + "platform_inventory_item_id": "string", + "price": 0.1, + "seller_sku": "string" + } + ], + "created_on": "2019-08-24T14:15:22Z", + "customs": { + "country_code_of_origin": "string", + "currency": "string", + "description": "string", + "hs_tariff_code": "string", + "is321_eligible": true, + "value": 0 + }, + "dimension": { + "height": 0.1, + "is_locked": true, + "length": 0.1, + "source": "string", + "unit": "string", + "width": 0.1 + }, + "fulfillment_settings": { + "dangerous_goods": true, + "is_bpm_parcel": true, + "is_case_pick": true, + "msds_url": "string", + "requires_prop65": true, + "serial_scan": { + "exact_character_length": 0, + "is_enabled": true, + "prefix": "string", + "suffix": "string" + } + }, + "gtin": "string", + "id": 0, + "inventory": { + "inventory_id": 0, + "on_hand_qty": 0 + }, + "is_digital": true, + "is_image_uploaded": true, + "lot_information": { + "is_lot": true, + "minimum_shelf_life_days": 0 + }, + "merge_children": [ + { + "channel_ids": [ + 0 + ], + "completed_at": "2019-08-24T14:15:22Z", + "inventory_id": 0, + "variant_id": 0, + "variant_name": "string" + } + ], + "name": "string", + "packaging_material_type": { + "id": 0, + "name": "string" + }, + "packaging_requirement": { + "id": 0, + "name": "string" + }, + "return_preferences": { + "backup_action": { + "id": 0, + "name": "string" + }, + "instructions": "string", + "primary_action": { + "id": 0, + "name": "string" + }, + "return_to_sender_backup_action": { + "id": 0, + "name": "string" + }, + "return_to_sender_primary_action": { + "id": 0, + "name": "string" + } + }, + "reviews_pending": [ + "string" + ], + "sku": "string", + "status": "string", + "upc": "string", + "updated_on": "2019-08-24T14:15:22Z", + "weight": { + "unit": "string", + "weight": 0.1 + } + } + ] + } + } + } + } + }, + "requestBody": { + "x-name": "products.Post.Api.V5.Variant.VariantId.Channel.Metadata.Request.OneOf.AmazonChannelMetadataRequestModel.BaseChannelMetadataRequestModel.BigCommerceChannelMetadataRequestModel.ShopifyChannelMetadataRequestModel", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.Post.Api.V5.Variant.VariantId.Channel.Metadata.Request.OneOf.AmazonChannelMetadataRequestModel.BaseChannelMetadataRequestModel.BigCommerceChannelMetadataRequestModel.ShopifyChannelMetadataRequestModel" + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Products" + ] + } + }, + "/product:moveVariants": { + "post": { + "summary": "Migrates existing variants to a new product\n", + "operationId": "d88155a65d5492b57f4cf1d9b2351989", + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ProductViewModel" + }, + "example": { + "category": { + "id": 0, + "name": "string" + }, + "created_on": "2019-08-24T14:15:22Z", + "id": 0, + "name": "string", + "sub_category": { + "id": 0, + "name": "string" + }, + "taxonomy": { + "id": 0, + "name": "string", + "parent_id": 0, + "parent_name": "string", + "path": "string" + }, + "type": "string", + "updated_on": "2019-08-24T14:15:22Z", + "user_id": 0, + "variants": [ + { + "additional_hazmat_attributes": { + "charge_state_percentage": 0.1, + "container_metal": true, + "container_type": "string", + "lithium_battery_packaging": "string", + "lithium_battery_type": "string", + "magnet": true, + "net_volume": 0.1, + "net_weight": 0.1 + }, + "associated_bundles": [ + { + "product_id": 0, + "product_name": "string", + "quantity": 0, + "variant_id": 0, + "variant_sku": "string" + } + ], + "barcode": "string", + "barcode_sticker_url": "string", + "bundle_definition": [ + { + "product_id": 0, + "quantity": 0, + "variant_id": 0, + "variant_name": "string", + "variant_sku": "string" + } + ], + "channel_metadata": [ + { + "channel_id": 0, + "channel_name": "string", + "currency": "string", + "id": 0, + "is_inventory_sync_enabled": true, + "legacy_product_id": 0, + "platform": "string", + "platform_identifier": "string", + "platform_inventory_item_id": "string", + "price": 0.1, + "seller_sku": "string" + } + ], + "created_on": "2019-08-24T14:15:22Z", + "customs": { + "country_code_of_origin": "string", + "currency": "string", + "description": "string", + "hs_tariff_code": "string", + "is321_eligible": true, + "value": 0 + }, + "dimension": { + "height": 0.1, + "is_locked": true, + "length": 0.1, + "source": "string", + "unit": "string", + "width": 0.1 + }, + "fulfillment_settings": { + "dangerous_goods": true, + "is_bpm_parcel": true, + "is_case_pick": true, + "msds_url": "string", + "requires_prop65": true, + "serial_scan": { + "exact_character_length": 0, + "is_enabled": true, + "prefix": "string", + "suffix": "string" + } + }, + "gtin": "string", + "id": 0, + "inventory": { + "inventory_id": 0, + "on_hand_qty": 0 + }, + "is_digital": true, + "is_image_uploaded": true, + "lot_information": { + "is_lot": true, + "minimum_shelf_life_days": 0 + }, + "merge_children": [ + { + "channel_ids": [ + 0 + ], + "completed_at": "2019-08-24T14:15:22Z", + "inventory_id": 0, + "variant_id": 0, + "variant_name": "string" + } + ], + "name": "string", + "packaging_material_type": { + "id": 0, + "name": "string" + }, + "packaging_requirement": { + "id": 0, + "name": "string" + }, + "return_preferences": { + "backup_action": { + "id": 0, + "name": "string" + }, + "instructions": "string", + "primary_action": { + "id": 0, + "name": "string" + }, + "return_to_sender_backup_action": { + "id": 0, + "name": "string" + }, + "return_to_sender_primary_action": { + "id": 0, + "name": "string" + } + }, + "reviews_pending": [ + "string" + ], + "sku": "string", + "status": "string", + "upc": "string", + "updated_on": "2019-08-24T14:15:22Z", + "weight": { + "unit": "string", + "weight": 0.1 + } + } + ] + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.Post.Api.V5.Product.MoveVariants.Bad.Request.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.Post.Api.V5.Product.MoveVariants.Not.Found.OneOf.ProblemDetails.HttpValidationProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + } + }, + "requestBody": { + "x-name": "products.MigrateVariantRequestModel", + "description": "Migration definition", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.MigrateVariantRequestModel" + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Products" + ] + } + }, + "/product/{productId}/variants": { + "get": { + "summary": "Gets multiple product variants\n", + "operationId": "d7b5853f4a24d00f149fbe297ee11e5b", + "parameters": [ + { + "name": "productId", + "in": "path", + "required": true, + "description": "The product id\n", + "schema": { + "type": "string", + "format": "int64", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.VariantViewModelV5Array" + }, + "example": [ + { + "additional_hazmat_attributes": { + "charge_state_percentage": 0.1, + "container_metal": true, + "container_type": "string", + "lithium_battery_packaging": "string", + "lithium_battery_type": "string", + "magnet": true, + "net_volume": 0.1, + "net_weight": 0.1 + }, + "associated_bundles": [ + { + "product_id": 0, + "product_name": "string", + "quantity": 0, + "variant_id": 0, + "variant_sku": "string" + } + ], + "barcodes": [ + { + "sticker_url": "string", + "value": "string" + } + ], + "bundle_definition": [ + { + "product_id": 0, + "quantity": 0, + "variant_id": 0, + "variant_name": "string", + "variant_sku": "string" + } + ], + "channel_metadata": [ + { + "channel_id": 0, + "channel_name": "string", + "currency": "string", + "id": 0, + "is_inventory_sync_enabled": true, + "legacy_product_id": 0, + "platform": "string", + "platform_identifier": "string", + "platform_inventory_item_id": "string", + "price": 0.1, + "seller_sku": "string" + } + ], + "created_on": "2019-08-24T14:15:22Z", + "customs": { + "country_code_of_origin": "string", + "currency": "string", + "description": "string", + "hs_tariff_code": "string", + "is321_eligible": true, + "value": 0 + }, + "dimension": { + "height": 0.1, + "is_locked": true, + "length": 0.1, + "source": "string", + "unit": "string", + "width": 0.1 + }, + "fulfillment_settings": { + "dangerous_goods": true, + "is_bpm_parcel": true, + "is_case_pick": true, + "msds_url": "string", + "requires_prop65": true, + "serial_scan": { + "exact_character_length": 0, + "is_enabled": true, + "prefix": "string", + "suffix": "string" + } + }, + "gtin": "string", + "id": 0, + "inventory": { + "inventory_id": 0, + "on_hand_qty": 0 + }, + "is_digital": true, + "is_image_uploaded": true, + "lot_information": { + "is_lot": true, + "minimum_shelf_life_days": 0 + }, + "merge_children": [ + { + "channel_ids": [ + 0 + ], + "completed_at": "2019-08-24T14:15:22Z", + "inventory_id": 0, + "variant_id": 0, + "variant_name": "string" + } + ], + "name": "string", + "packaging_material_type": { + "id": 0, + "name": "string" + }, + "packaging_requirement": { + "id": 0, + "name": "string" + }, + "return_preferences": { + "backup_action": { + "id": 0, + "name": "string" + }, + "instructions": "string", + "primary_action": { + "id": 0, + "name": "string" + }, + "return_to_sender_backup_action": { + "id": 0, + "name": "string" + }, + "return_to_sender_primary_action": { + "id": 0, + "name": "string" + } + }, + "reviews_pending": [ + "string" + ], + "sku": "string", + "status": "string", + "upc": "string", + "updated_on": "2019-08-24T14:15:22Z", + "weight": { + "unit": "string", + "weight": 0.1 + } + } + ] + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.Get.Api.V5.Product.ProductId.Variants.Bad.Request.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.Get.Api.V5.Product.ProductId.Variants.Not.Found.OneOf.ProblemDetails.HttpValidationProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Products" + ] + }, + "post": { + "summary": "Adds new product variants to a product\n", + "operationId": "14daa5e4386442d68fbf15d81ca67bea", + "parameters": [ + { + "name": "productId", + "in": "path", + "required": true, + "description": "", + "schema": { + "type": "string", + "format": "int64", + "additionalProperties": false + } + } + ], + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ProductViewModelV5" + }, + "example": { + "created_on": "2019-08-24T14:15:22Z", + "id": 0, + "name": "string", + "taxonomy": { + "id": 0, + "name": "string", + "parent_id": 0, + "parent_name": "string", + "path": "string" + }, + "type": "string", + "updated_on": "2019-08-24T14:15:22Z", + "user_id": 0, + "variants": [ + { + "additional_hazmat_attributes": { + "charge_state_percentage": 0.1, + "container_metal": true, + "container_type": "string", + "lithium_battery_packaging": "string", + "lithium_battery_type": "string", + "magnet": true, + "net_volume": 0.1, + "net_weight": 0.1 + }, + "associated_bundles": [ + { + "product_id": 0, + "product_name": "string", + "quantity": 0, + "variant_id": 0, + "variant_sku": "string" + } + ], + "barcodes": [ + { + "sticker_url": "string", + "value": "string" + } + ], + "bundle_definition": [ + { + "product_id": 0, + "quantity": 0, + "variant_id": 0, + "variant_name": "string", + "variant_sku": "string" + } + ], + "channel_metadata": [ + { + "channel_id": 0, + "channel_name": "string", + "currency": "string", + "id": 0, + "is_inventory_sync_enabled": true, + "legacy_product_id": 0, + "platform": "string", + "platform_identifier": "string", + "platform_inventory_item_id": "string", + "price": 0.1, + "seller_sku": "string" + } + ], + "created_on": "2019-08-24T14:15:22Z", + "customs": { + "country_code_of_origin": "string", + "currency": "string", + "description": "string", + "hs_tariff_code": "string", + "is321_eligible": true, + "value": 0 + }, + "dimension": { + "height": 0.1, + "is_locked": true, + "length": 0.1, + "source": "string", + "unit": "string", + "width": 0.1 + }, + "fulfillment_settings": { + "dangerous_goods": true, + "is_bpm_parcel": true, + "is_case_pick": true, + "msds_url": "string", + "requires_prop65": true, + "serial_scan": { + "exact_character_length": 0, + "is_enabled": true, + "prefix": "string", + "suffix": "string" + } + }, + "gtin": "string", + "id": 0, + "inventory": { + "inventory_id": 0, + "on_hand_qty": 0 + }, + "is_digital": true, + "is_image_uploaded": true, + "lot_information": { + "is_lot": true, + "minimum_shelf_life_days": 0 + }, + "merge_children": [ + { + "channel_ids": [ + 0 + ], + "completed_at": "2019-08-24T14:15:22Z", + "inventory_id": 0, + "variant_id": 0, + "variant_name": "string" + } + ], + "name": "string", + "packaging_material_type": { + "id": 0, + "name": "string" + }, + "packaging_requirement": { + "id": 0, + "name": "string" + }, + "return_preferences": { + "backup_action": { + "id": 0, + "name": "string" + }, + "instructions": "string", + "primary_action": { + "id": 0, + "name": "string" + }, + "return_to_sender_backup_action": { + "id": 0, + "name": "string" + }, + "return_to_sender_primary_action": { + "id": 0, + "name": "string" + } + }, + "reviews_pending": [ + "string" + ], + "sku": "string", + "status": "string", + "upc": "string", + "updated_on": "2019-08-24T14:15:22Z", + "weight": { + "unit": "string", + "weight": 0.1 + } + } + ] + } + } + } + } + }, + "requestBody": { + "x-name": "products.CreateProductVariantRequestModelV5Array", + "description": "The product variants to add to product", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.CreateProductVariantRequestModelV5Array" + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Products" + ] + }, + "patch": { + "summary": "Updates multiple product variants\n", + "operationId": "16364e8117703570686434e0b3ba7abe", + "parameters": [ + { + "name": "productId", + "in": "path", + "required": true, + "description": "", + "schema": { + "type": "string", + "format": "int64", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.VariantViewModelV5Array" + }, + "example": [ + { + "additional_hazmat_attributes": { + "charge_state_percentage": 0.1, + "container_metal": true, + "container_type": "string", + "lithium_battery_packaging": "string", + "lithium_battery_type": "string", + "magnet": true, + "net_volume": 0.1, + "net_weight": 0.1 + }, + "associated_bundles": [ + { + "product_id": 0, + "product_name": "string", + "quantity": 0, + "variant_id": 0, + "variant_sku": "string" + } + ], + "barcodes": [ + { + "sticker_url": "string", + "value": "string" + } + ], + "bundle_definition": [ + { + "product_id": 0, + "quantity": 0, + "variant_id": 0, + "variant_name": "string", + "variant_sku": "string" + } + ], + "channel_metadata": [ + { + "channel_id": 0, + "channel_name": "string", + "currency": "string", + "id": 0, + "is_inventory_sync_enabled": true, + "legacy_product_id": 0, + "platform": "string", + "platform_identifier": "string", + "platform_inventory_item_id": "string", + "price": 0.1, + "seller_sku": "string" + } + ], + "created_on": "2019-08-24T14:15:22Z", + "customs": { + "country_code_of_origin": "string", + "currency": "string", + "description": "string", + "hs_tariff_code": "string", + "is321_eligible": true, + "value": 0 + }, + "dimension": { + "height": 0.1, + "is_locked": true, + "length": 0.1, + "source": "string", + "unit": "string", + "width": 0.1 + }, + "fulfillment_settings": { + "dangerous_goods": true, + "is_bpm_parcel": true, + "is_case_pick": true, + "msds_url": "string", + "requires_prop65": true, + "serial_scan": { + "exact_character_length": 0, + "is_enabled": true, + "prefix": "string", + "suffix": "string" + } + }, + "gtin": "string", + "id": 0, + "inventory": { + "inventory_id": 0, + "on_hand_qty": 0 + }, + "is_digital": true, + "is_image_uploaded": true, + "lot_information": { + "is_lot": true, + "minimum_shelf_life_days": 0 + }, + "merge_children": [ + { + "channel_ids": [ + 0 + ], + "completed_at": "2019-08-24T14:15:22Z", + "inventory_id": 0, + "variant_id": 0, + "variant_name": "string" + } + ], + "name": "string", + "packaging_material_type": { + "id": 0, + "name": "string" + }, + "packaging_requirement": { + "id": 0, + "name": "string" + }, + "return_preferences": { + "backup_action": { + "id": 0, + "name": "string" + }, + "instructions": "string", + "primary_action": { + "id": 0, + "name": "string" + }, + "return_to_sender_backup_action": { + "id": 0, + "name": "string" + }, + "return_to_sender_primary_action": { + "id": 0, + "name": "string" + } + }, + "reviews_pending": [ + "string" + ], + "sku": "string", + "status": "string", + "upc": "string", + "updated_on": "2019-08-24T14:15:22Z", + "weight": { + "unit": "string", + "weight": 0.1 + } + } + ] + } + } + } + }, + "requestBody": { + "x-name": "products.UpdateProductVariantModelV5", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.UpdateProductVariantModelV5" + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Products" + ] + } + }, + "/product": { + "post": { + "summary": "Create single product to the store\n", + "operationId": "0c4a773215d74006c7062e138ae1b94e", + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ProductViewModelV5" + }, + "example": { + "created_on": "2019-08-24T14:15:22Z", + "id": 0, + "name": "string", + "taxonomy": { + "id": 0, + "name": "string", + "parent_id": 0, + "parent_name": "string", + "path": "string" + }, + "type": "string", + "updated_on": "2019-08-24T14:15:22Z", + "user_id": 0, + "variants": [ + { + "additional_hazmat_attributes": { + "charge_state_percentage": 0.1, + "container_metal": true, + "container_type": "string", + "lithium_battery_packaging": "string", + "lithium_battery_type": "string", + "magnet": true, + "net_volume": 0.1, + "net_weight": 0.1 + }, + "associated_bundles": [ + { + "product_id": 0, + "product_name": "string", + "quantity": 0, + "variant_id": 0, + "variant_sku": "string" + } + ], + "barcodes": [ + { + "sticker_url": "string", + "value": "string" + } + ], + "bundle_definition": [ + { + "product_id": 0, + "quantity": 0, + "variant_id": 0, + "variant_name": "string", + "variant_sku": "string" + } + ], + "channel_metadata": [ + { + "channel_id": 0, + "channel_name": "string", + "currency": "string", + "id": 0, + "is_inventory_sync_enabled": true, + "legacy_product_id": 0, + "platform": "string", + "platform_identifier": "string", + "platform_inventory_item_id": "string", + "price": 0.1, + "seller_sku": "string" + } + ], + "created_on": "2019-08-24T14:15:22Z", + "customs": { + "country_code_of_origin": "string", + "currency": "string", + "description": "string", + "hs_tariff_code": "string", + "is321_eligible": true, + "value": 0 + }, + "dimension": { + "height": 0.1, + "is_locked": true, + "length": 0.1, + "source": "string", + "unit": "string", + "width": 0.1 + }, + "fulfillment_settings": { + "dangerous_goods": true, + "is_bpm_parcel": true, + "is_case_pick": true, + "msds_url": "string", + "requires_prop65": true, + "serial_scan": { + "exact_character_length": 0, + "is_enabled": true, + "prefix": "string", + "suffix": "string" + } + }, + "gtin": "string", + "id": 0, + "inventory": { + "inventory_id": 0, + "on_hand_qty": 0 + }, + "is_digital": true, + "is_image_uploaded": true, + "lot_information": { + "is_lot": true, + "minimum_shelf_life_days": 0 + }, + "merge_children": [ + { + "channel_ids": [ + 0 + ], + "completed_at": "2019-08-24T14:15:22Z", + "inventory_id": 0, + "variant_id": 0, + "variant_name": "string" + } + ], + "name": "string", + "packaging_material_type": { + "id": 0, + "name": "string" + }, + "packaging_requirement": { + "id": 0, + "name": "string" + }, + "return_preferences": { + "backup_action": { + "id": 0, + "name": "string" + }, + "instructions": "string", + "primary_action": { + "id": 0, + "name": "string" + }, + "return_to_sender_backup_action": { + "id": 0, + "name": "string" + }, + "return_to_sender_primary_action": { + "id": 0, + "name": "string" + } + }, + "reviews_pending": [ + "string" + ], + "sku": "string", + "status": "string", + "upc": "string", + "updated_on": "2019-08-24T14:15:22Z", + "weight": { + "unit": "string", + "weight": 0.1 + } + } + ] + } + } + } + } + }, + "requestBody": { + "x-name": "products.CreateProductRequestModelV5", + "description": "The product to add", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.CreateProductRequestModelV5" + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Products" + ] + }, + "get": { + "summary": "Retrieves List of Products based on filters provided\n", + "operationId": "5e4fe606de2077dfa918ff128f5bbfff", + "parameters": [ + { + "name": "Search", + "in": "query", + "description": "Search Products by name, sku, inventory id or product Id.\n", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "Barcode", + "in": "query", + "description": "Barcode Associated with variant\n", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "Barcodes", + "in": "query", + "description": "Barcodes Associated with variant\n", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "CategoryIds", + "in": "query", + "description": "List of Category Ids associated with product\n", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "ChannelIds", + "in": "query", + "description": "Looks for Products variants by their channel IDs\n", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "HasDigitalVariants", + "in": "query", + "description": "Looks for Products with/without digital variants\n", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "HasVariants", + "in": "query", + "description": "Looks for Products with/without variants\n", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "InventoryId", + "in": "query", + "description": "Looks for variants by its associated inventory id\n", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "IsInventorySyncEnabled", + "in": "query", + "description": "Looks for Products variants by their IsInventorySyncEnabled is true\n", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "LastUpdatedTimestamp", + "in": "query", + "description": "Looks for Products that have been updated since the given date\n", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "LegacyIds", + "in": "query", + "description": "Looks for Products with by Legacy Product Id(s)\n", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "Name", + "in": "query", + "description": "Looks for Products/Variants by name\n", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "OnHand", + "in": "query", + "description": "Looks for Products with inventory\n", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "PlatformIds", + "in": "query", + "description": "Looks for Products variants by their external Platform IDs\n", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "ProductId", + "in": "query", + "description": "Looks for Products with an assigned Id\n", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "ProductType", + "in": "query", + "description": "Looks for Products by type\n", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "ReviewsPending", + "in": "query", + "description": "Looks for Products by ReviewsPending\n", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "SalesChannel", + "in": "query", + "description": "Looks for Products variants assigned to a platform/sales channel \n", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "SellerSKU", + "in": "query", + "description": "Looks for Products that match the provided Seller query\n", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "SKU", + "in": "query", + "description": "Looks for Products that match the provided Sku query\n", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "TaxonomyIds", + "in": "query", + "description": "Looks for Products variants by their taxonomy id or any descendants of the taxonomies sent separated by comma\n", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "VariantId", + "in": "query", + "description": "Looks for products that contain a variant with the given ID\n", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "VariantStatus", + "in": "query", + "description": "Looks for Products with variants that contain provided status\n", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "PageSize", + "in": "query", + "description": "1-250\n", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "SortBy", + "in": "query", + "description": "Id, Name, Category, TotalOnHandQty\n", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "SortOrder", + "in": "query", + "description": "ASC,DESC\n", + "schema": { + "type": "string", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ProductViewModelV5PagedResponse" + }, + "example": { + "first": "string", + "items": [ + { + "created_on": "2019-08-24T14:15:22Z", + "id": 0, + "name": "string", + "taxonomy": { + "id": 0, + "name": "string", + "parent_id": 0, + "parent_name": "string", + "path": "string" + }, + "type": "string", + "updated_on": "2019-08-24T14:15:22Z", + "user_id": 0, + "variants": [ + { + "additional_hazmat_attributes": { + "charge_state_percentage": 0.1, + "container_metal": true, + "container_type": "string", + "lithium_battery_packaging": "string", + "lithium_battery_type": "string", + "magnet": true, + "net_volume": 0.1, + "net_weight": 0.1 + }, + "associated_bundles": [ + { + "product_id": 0, + "product_name": "string", + "quantity": 0, + "variant_id": 0, + "variant_sku": "string" + } + ], + "barcodes": [ + { + "sticker_url": "string", + "value": "string" + } + ], + "bundle_definition": [ + { + "product_id": 0, + "quantity": 0, + "variant_id": 0, + "variant_name": "string", + "variant_sku": "string" + } + ], + "channel_metadata": [ + { + "channel_id": 0, + "channel_name": "string", + "currency": "string", + "id": 0, + "is_inventory_sync_enabled": true, + "legacy_product_id": 0, + "platform": "string", + "platform_identifier": "string", + "platform_inventory_item_id": "string", + "price": 0.1, + "seller_sku": "string" + } + ], + "created_on": "2019-08-24T14:15:22Z", + "customs": { + "country_code_of_origin": "string", + "currency": "string", + "description": "string", + "hs_tariff_code": "string", + "is321_eligible": true, + "value": 0 + }, + "dimension": { + "height": 0.1, + "is_locked": true, + "length": 0.1, + "source": "string", + "unit": "string", + "width": 0.1 + }, + "fulfillment_settings": { + "dangerous_goods": true, + "is_bpm_parcel": true, + "is_case_pick": true, + "msds_url": "string", + "requires_prop65": true, + "serial_scan": { + "exact_character_length": 0, + "is_enabled": true, + "prefix": "string", + "suffix": "string" + } + }, + "gtin": "string", + "id": 0, + "inventory": { + "inventory_id": 0, + "on_hand_qty": 0 + }, + "is_digital": true, + "is_image_uploaded": true, + "lot_information": { + "is_lot": true, + "minimum_shelf_life_days": 0 + }, + "merge_children": [ + { + "channel_ids": [ + 0 + ], + "completed_at": "2019-08-24T14:15:22Z", + "inventory_id": 0, + "variant_id": 0, + "variant_name": "string" + } + ], + "name": "string", + "packaging_material_type": { + "id": 0, + "name": "string" + }, + "packaging_requirement": { + "id": 0, + "name": "string" + }, + "return_preferences": { + "backup_action": { + "id": 0, + "name": "string" + }, + "instructions": "string", + "primary_action": { + "id": 0, + "name": "string" + }, + "return_to_sender_backup_action": { + "id": 0, + "name": "string" + }, + "return_to_sender_primary_action": { + "id": 0, + "name": "string" + } + }, + "reviews_pending": [ + "string" + ], + "sku": "string", + "status": "string", + "upc": "string", + "updated_on": "2019-08-24T14:15:22Z", + "weight": { + "unit": "string", + "weight": 0.1 + } + } + ] + } + ], + "last": "string", + "next": "string", + "prev": "string" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.Get.Api.V5.Product.Bad.Request.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.Get.Api.V5.Product.Not.Found.OneOf.ProblemDetails.HttpValidationProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Products" + ] + } + }, + "/taxonomy": { + "get": { + "summary": " Gets Taxonomy\n", + "operationId": "261e342a8a9514a5c30d6321ef4ff2c2", + "parameters": [ + { + "name": "search", + "in": "query", + "description": "", + "schema": { + "type": "string", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.TaxonomyViewModelArray" + }, + "example": [ + { + "children": [ + { + "has_children": true, + "id": 0, + "name": "string", + "path": "string" + } + ], + "id": 0, + "name": "string", + "parent": { + "id": 0, + "name": "string", + "path": "string" + }, + "path": "string" + } + ] + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.Get.Api.V5.Taxonomy.Unauthorized.OneOf.ProblemDetails.HttpValidationProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.Get.Api.V5.Taxonomy.Forbidden.OneOf.ProblemDetails.HttpValidationProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "500": { + "description": "Server Error" + }, + "503": { + "description": "Server Error" + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Products" + ] + } + }, + "/inventory": { + "get": { + "summary": " Get All Inventories\n", + "operationId": "55ea81cc486b4660a8c518109ef38bec", + "parameters": [ + { + "name": "SearchBy", + "in": "query", + "description": "", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "FilterOperations", + "in": "query", + "description": "", + "schema": { + "type": "string", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.FilterOperation" + } + } + }, + { + "name": "InventoryIds", + "in": "query", + "description": "", + "schema": { + "type": "string", + "additionalProperties": false, + "items": { + "type": "integer", + "format": "int32", + "additionalProperties": false + } + } + }, + { + "name": "IsActive", + "in": "query", + "description": "", + "schema": { + "type": "boolean", + "additionalProperties": false + } + }, + { + "name": "IsDigital", + "in": "query", + "description": "", + "schema": { + "type": "boolean", + "additionalProperties": false + } + }, + { + "name": "PageSize", + "in": "query", + "description": "", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + }, + { + "name": "SortBy", + "in": "query", + "description": "", + "schema": { + "type": "string", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.InventoryResponsePagedResponse" + }, + "example": { + "first": "string", + "items": [ + { + "barcode": "string", + "dimensions": { + "height": 0.1, + "is_locked": true, + "length": 0.1, + "unit": "string", + "validated": true, + "width": 0.1 + }, + "inventory_id": 0, + "is_case": true, + "is_lot": true, + "name": "string", + "sku": "string", + "user_id": 0, + "variant": { + "hazmat": { + "is_hazmat": true, + "validated": true + }, + "is_active": true, + "is_bundle": true, + "is_digital": true + }, + "weight": { + "unit": "string", + "value": 0.1 + } + } + ], + "last": "string", + "next": "string", + "prev": "string" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.ProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.ProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.ProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Service Unavailable" + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Inventory" + ] + } + }, + "/inventory/{inventoryId}": { + "get": { + "summary": " Get Inventory\n", + "operationId": "588a8bb9e4086c9f6a2bf1bf3d4beb55", + "parameters": [ + { + "name": "inventoryId", + "in": "path", + "required": true, + "description": "", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.InventoryResponse" + }, + "example": { + "barcode": "string", + "dimensions": { + "height": 0.1, + "is_locked": true, + "length": 0.1, + "unit": "string", + "validated": true, + "width": 0.1 + }, + "inventory_id": 0, + "is_case": true, + "is_lot": true, + "name": "string", + "sku": "string", + "user_id": 0, + "variant": { + "hazmat": { + "is_hazmat": true, + "validated": true + }, + "is_active": true, + "is_bundle": true, + "is_digital": true + }, + "weight": { + "unit": "string", + "value": 0.1 + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.ProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.ProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.ProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.ProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Service Unavailable" + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Inventory" + ] + } + }, + "/inventory-level/{inventoryId}": { + "get": { + "summary": " Get Inventory Levels\n", + "operationId": "5b9cfd1450a84019e5dac4ebf0ea9259", + "parameters": [ + { + "name": "inventoryId", + "in": "path", + "required": true, + "description": "", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.InventoryQuantityResponse" + }, + "example": { + "inventory_id": 0, + "name": "string", + "sku": "string", + "total_awaiting_quantity": 0, + "total_backordered_quantity": 0, + "total_committed_quantity": 0, + "total_exception_quantity": 0, + "total_fulfillable_quantity": 0, + "total_internal_transfer_quantity": 0, + "total_on_hand_quantity": 0, + "total_sellable_quantity": 0 + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.ProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.ProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.ProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.ProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Service Unavailable" + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Inventory" + ] + } + }, + "/inventory-level": { + "get": { + "summary": " Get All Inventory Levels\n", + "operationId": "b4a2f3342be39dee2ab660584ebab083", + "parameters": [ + { + "name": "SearchBy", + "in": "query", + "description": "", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "InventoryIds", + "in": "query", + "description": "", + "schema": { + "type": "string", + "additionalProperties": false, + "items": { + "type": "integer", + "format": "int32", + "additionalProperties": false + } + } + }, + { + "name": "IsActive", + "in": "query", + "description": "", + "schema": { + "type": "boolean", + "additionalProperties": false + } + }, + { + "name": "IsDigital", + "in": "query", + "description": "", + "schema": { + "type": "boolean", + "additionalProperties": false + } + }, + { + "name": "PageSize", + "in": "query", + "description": "", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + }, + { + "name": "SortBy", + "in": "query", + "description": "", + "schema": { + "type": "string", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.InventoryQuantityResponsePagedResponse" + }, + "example": { + "first": "string", + "items": [ + { + "inventory_id": 0, + "name": "string", + "sku": "string", + "total_awaiting_quantity": 0, + "total_backordered_quantity": 0, + "total_committed_quantity": 0, + "total_exception_quantity": 0, + "total_fulfillable_quantity": 0, + "total_internal_transfer_quantity": 0, + "total_on_hand_quantity": 0, + "total_sellable_quantity": 0 + } + ], + "last": "string", + "next": "string", + "prev": "string" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.ProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.ProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.ProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Service Unavailable" + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Inventory" + ] + } + }, + "/inventory-level/locations": { + "get": { + "summary": " Get All Inventory Levels Grouped By Fulfillment Center\n", + "operationId": "5f12efb2a1517dff2926d5841c57948d", + "parameters": [ + { + "name": "LocationType", + "in": "query", + "description": "", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "LocationId", + "in": "query", + "description": "", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + }, + { + "name": "SearchBy", + "in": "query", + "description": "", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "InventoryIds", + "in": "query", + "description": "", + "schema": { + "type": "string", + "additionalProperties": false, + "items": { + "type": "integer", + "format": "int32", + "additionalProperties": false + } + } + }, + { + "name": "IsActive", + "in": "query", + "description": "", + "schema": { + "type": "boolean", + "additionalProperties": false + } + }, + { + "name": "IsDigital", + "in": "query", + "description": "", + "schema": { + "type": "boolean", + "additionalProperties": false + } + }, + { + "name": "PageSize", + "in": "query", + "description": "", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + }, + { + "name": "SortBy", + "in": "query", + "description": "", + "schema": { + "type": "string", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.InventoryQuantityFcResponsePagedResponse" + }, + "example": { + "first": "string", + "items": [ + { + "inventory_id": 0, + "locations": [ + { + "awaiting_quantity": 0, + "committed_quantity": 0, + "fulfillable_quantity": 0, + "internal_transfer_quantity": 0, + "location_id": 0, + "name": "string", + "on_hand_quantity": 0 + } + ], + "name": "string", + "sku": "string" + } + ], + "last": "string", + "next": "string", + "prev": "string" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.ProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.ProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.ProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Service Unavailable" + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Inventory" + ] + } + }, + "/inventory-level/lots": { + "get": { + "summary": " Get All Inventory Levels Grouped By Lot\n", + "operationId": "75137f9e260840bd8493ddb513efe4f4", + "parameters": [ + { + "name": "LocationId", + "in": "query", + "description": "", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + }, + { + "name": "SearchBy", + "in": "query", + "description": "", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "InventoryIds", + "in": "query", + "description": "", + "schema": { + "type": "string", + "additionalProperties": false, + "items": { + "type": "integer", + "format": "int32", + "additionalProperties": false + } + } + }, + { + "name": "IsActive", + "in": "query", + "description": "", + "schema": { + "type": "boolean", + "additionalProperties": false + } + }, + { + "name": "IsDigital", + "in": "query", + "description": "", + "schema": { + "type": "boolean", + "additionalProperties": false + } + }, + { + "name": "PageSize", + "in": "query", + "description": "", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + }, + { + "name": "SortBy", + "in": "query", + "description": "", + "schema": { + "type": "string", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.InventoryQuantityLotResponsePagedResponse" + }, + "example": { + "first": "string", + "items": [ + { + "inventory_id": 0, + "lots": [ + { + "awaiting_quantity": 0, + "committed_quantity": 0, + "fulfillable_quantity": 0, + "internal_transfer_quantity": 0, + "locations": [ + { + "awaiting_quantity": 0, + "committed_quantity": 0, + "fulfillable_quantity": 0, + "internal_transfer_quantity": 0, + "location_id": 0, + "name": "string", + "on_hand_quantity": 0 + } + ], + "lot_date": "2019-08-24T14:15:22Z", + "lot_number": "string", + "on_hand_quantity": 0 + } + ], + "name": "string", + "sku": "string" + } + ], + "last": "string", + "next": "string", + "prev": "string" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.ProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.ProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.ProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Service Unavailable" + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Inventory" + ] + } + }, + "/inventory-level/{inventoryId}/lots": { + "get": { + "summary": " Get Inventory Levels Grouped By Lot\n", + "operationId": "4abdcbec15589f2ac52f6e26221a8cf3", + "parameters": [ + { + "name": "inventoryId", + "in": "path", + "required": true, + "description": "", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.InventoryQuantityLotResponse" + }, + "example": { + "inventory_id": 0, + "lots": [ + { + "awaiting_quantity": 0, + "committed_quantity": 0, + "fulfillable_quantity": 0, + "internal_transfer_quantity": 0, + "locations": [ + { + "awaiting_quantity": 0, + "committed_quantity": 0, + "fulfillable_quantity": 0, + "internal_transfer_quantity": 0, + "location_id": 0, + "name": "string", + "on_hand_quantity": 0 + } + ], + "lot_date": "2019-08-24T14:15:22Z", + "lot_number": "string", + "on_hand_quantity": 0 + } + ], + "name": "string", + "sku": "string" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.ProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.ProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.ProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.ProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Service Unavailable" + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Inventory" + ] + } + }, + "/inventory-level/{inventoryId}/locations": { + "get": { + "summary": " Get Inventory Levels Grouped By Fulfillment Center\n", + "operationId": "02c3d358d738d964e4660c65e9d1beb8", + "parameters": [ + { + "name": "inventoryId", + "in": "path", + "required": true, + "description": "", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.InventoryQuantityFcResponse" + }, + "example": { + "inventory_id": 0, + "locations": [ + { + "awaiting_quantity": 0, + "committed_quantity": 0, + "fulfillable_quantity": 0, + "internal_transfer_quantity": 0, + "location_id": 0, + "name": "string", + "on_hand_quantity": 0 + } + ], + "name": "string", + "sku": "string" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.ProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.ProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.ProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.ProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "503": { + "description": "Service Unavailable" + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Inventory" + ] + } + }, + "/invoices": { + "get": { + "summary": "Get Invoices", + "description": "Gets a paginated list of invoices, optionally filtered by invoice types and date range", + "operationId": "82489ce93a8051f0db08726951ab8c5e", + "parameters": [ + { + "name": "Cursor", + "in": "query", + "description": "[Optional] A pagination token used to jump to first, last, next or previous pages. When supplied, it overrides all other filter parameters.\n", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "FromDate", + "in": "query", + "description": "[Optional] Start date for filtering invoices by invoice date.\n", + "schema": { + "type": "string", + "format": "date-time", + "additionalProperties": false + } + }, + { + "name": "ToDate", + "in": "query", + "description": "[Optional] End date for filtering invoices by invoice date.\n", + "schema": { + "type": "string", + "format": "date-time", + "additionalProperties": false + } + }, + { + "name": "InvoiceTypes", + "in": "query", + "description": "[Optional] Filter invoices by invoice type. Valid values: Shipping,WarehouseStorage,Inbound Fee,Return,AdditionalFee,Credits", + "schema": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + { + "name": "PageSize", + "in": "query", + "description": "Number of invoices to return per page (default: 100). Must be between 1 and 1000.\n", + "schema": { + "type": "number", + "format": "int32", + "additionalProperties": false + } + }, + { + "name": "SortOrder", + "in": "query", + "description": "Sort invoices by Invoice Date. Values - Ascending, Descending. Default: Descending.\n", + "schema": { + "type": "string", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Billing.InvoiceDtoCursorPagedResponseV3" + }, + "example": { + "first": "m8cUk/xJkbeYp2JJvL8oHqxL2hFuGz3qjqtkQ", + "items": [ + { + "amount": 0.01, + "currency_code": "USD", + "invoice_date": "2019-08-24", + "invoice_id": 12345, + "invoice_type": "Shipping", + "running_balance": 123.01 + } + ], + "last": "n8cUk/xJkbeYp2JJvL8oHqxL2hFiGz3qjqtkQ", + "next": "m8cUk/xJkbeYp2JhvL8oHqxL3hFiGz3qjqtkQ", + "prev": "m8cUk/xJkbeYp2JJvL8oHqxL2hFvGz3qjqtkQ" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Billing.ProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "401": { + "description": "Authorization missing or invalid" + }, + "403": { + "description": "The provided credentials are not authorized to access this resource" + }, + "422": { + "description": "Client Error", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Billing.ProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "500": { + "description": "Server Error" + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Billing" + ] + } + }, + "/transaction-fees": { + "get": { + "summary": "Get transaction fees\n", + "description": "This endpoint returns a list of transaction fees\n", + "operationId": "ede670103f9e3b509a817241a0821a38", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Billing.TransactionFeeModelV3" + }, + "example": { + "fee_list": [ + "Shipping" + ] + } + } + } + }, + "401": { + "description": "Authorization missing or invalid" + }, + "403": { + "description": "The provided credentials are not authorized to access this resource" + }, + "500": { + "description": "Server Error" + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Billing" + ] + } + }, + "/transactions:query": { + "post": { + "summary": "Search transactions", + "description": "Search transactions with filters (date, invoice, fee type, etc.)", + "operationId": "e3b509d887ccd0877c1cc2c393cb77a1", + "parameters": [ + { + "name": "Cursor", + "in": "query", + "description": "[Optional] A pagination token used to jump to first, last, next or previous pages. When supplied, it overrides all other filter parameters.\n", + "schema": { + "type": "string", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Billing.TransactionDtoCursorPagedResponseV3" + }, + "example": { + "first": "f8cUk/xJkbeYp2L8oHqxL2hFiGz3qjre", + "items": [ + { + "additional_details": { + "comment": "TestInvoice" + }, + "amount": 0.09, + "charge_date": "2025-01-01", + "currency_code": "USD", + "fulfillment_center": "Altona VIC", + "invoice_date": "2025-01-01", + "invoice_id": 12345, + "invoice_type": "Shipping", + "invoiced_status": true, + "reference_id": "12345", + "reference_type": "Shipment", + "taxes": [ + { + "tax_amount": 0.01, + "tax_rate": 10, + "tax_type": "GST" + } + ], + "transaction_fee": "Shipping", + "transaction_type": "Charge" + } + ], + "last": "f8cUk/xJkbeYp2L8oHqxL2hFiGz3qjqt", + "next": "f8cUk/xjhyEYp2L8oHqxL2hFiGz3qjqt", + "prev": "f8cUk/xJkbeYp2L8oHqxL2hFiGz3qjcc" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Billing.ProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "401": { + "description": "Authorization missing or invalid" + }, + "403": { + "description": "The provided credentials are not authorized to access this resource" + }, + "500": { + "description": "Server Error" + } + }, + "requestBody": { + "x-name": "billing.TransactionRequestFilterV3", + "description": "Used to filter transactions based on search criteria. Required if cursor is not provided. Ignored when cursor is present (i.e., for paginated requests).", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Billing.TransactionRequestFilterV3" + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Billing" + ] + } + }, + "/invoices/{invoiceId}/transactions": { + "get": { + "summary": "Get transactions by invoiceid\n", + "description": "The unique identifier of the invoice whose transactions are to be retrieved", + "operationId": "67caf0689d7942353fb639b3fb23dec0", + "parameters": [ + { + "name": "invoiceId", + "in": "path", + "required": true, + "description": "The unique identifier of the invoice whose transactions are to be retrieved Ex:-12345.\n", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + }, + { + "name": "Cursor", + "in": "query", + "description": "[Optional] A pagination token used to jump to first, last, next or previous pages. When supplied, it overrides all other filter parameters.\n", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "PageSize", + "in": "query", + "description": "Number of transactions to return per page (default is 100, to be entered when API is called for first time). Must be between 1 and 1000.\n", + "schema": { + "type": "number", + "format": "int32", + "additionalProperties": false + } + }, + { + "name": "SortOrder", + "in": "query", + "description": "Sort order of the results. Valid values: Ascending or Descending (default: Descending).\n", + "schema": { + "type": "string", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Billing.TransactionDtoCursorPagedResponseV3" + }, + "example": { + "first": "f8cUk/xJkbeYp2L8oHqxL2hFiGz3qjre", + "items": [ + { + "additional_details": { + "comment": "TestInvoice" + }, + "amount": 0.09, + "charge_date": "2025-01-01", + "currency_code": "USD", + "fulfillment_center": "Altona VIC", + "invoice_date": "2025-01-01", + "invoice_id": 12345, + "invoice_type": "Shipping", + "invoiced_status": true, + "reference_id": "12345", + "reference_type": "Shipment", + "taxes": [ + { + "tax_amount": 0.01, + "tax_rate": 10, + "tax_type": "GST" + } + ], + "transaction_fee": "Shipping", + "transaction_type": "Charge" + } + ], + "last": "f8cUk/xJkbeYp2L8oHqxL2hFiGz3qjqt", + "next": "f8cUk/xjhyEYp2L8oHqxL2hFiGz3qjqt", + "prev": "f8cUk/xJkbeYp2L8oHqxL2hFiGz3qjcc" + } + } + } + }, + "401": { + "description": "Authorization missing or invalid" + }, + "403": { + "description": "The provided credentials are not authorized to access this resource" + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Billing.ProblemDetails" + }, + "example": { + "detail": "string", + "instance": "string", + "property1": null, + "property2": null, + "status": 0, + "title": "string", + "type": "string" + } + } + } + }, + "500": { + "description": "Server Error" + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Billing" + ] + } + }, + "/shipment:batchCancel": { + "post": { + "summary": "Cancel multiple Shipments by Shipment Id", + "operationId": "fb3df1042240c1361e915d4211646c9e", + "parameters": [ + { + "name": "shipbob_channel_id", + "in": "header", + "required": true, + "description": "Channel ID for Operation", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.CanceledShipmentsViewModel" + }, + "example": { + "results": [ + { + "action": "Cancel", + "is_success": true, + "reason": "string", + "shipment_id": 0 + } + ] + } + } + } + }, + "401": { + "description": "No access right at this time" + }, + "403": { + "description": "No access" + }, + "422": { + "description": "Client Error", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Post.Api.Shipment.Cancelbulk.Unprocessable.Entity.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + }, + "500": { + "description": "Server Error", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Post.Api.Shipment.Cancelbulk.Internal.Server.Error.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + } + }, + "requestBody": { + "x-name": "orders.CancelShipmentsModel", + "description": "The shipment IDs to cancel", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.CancelShipmentsModel" + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Orders" + ] + } + }, + "/shipment:batchUpdateTrackingUpload": { + "post": { + "summary": "Update Tracking Uploaded Status for Multiple Shipments by Shipment Id", + "operationId": "690c5e9e61b830fb83df7cdfe849701e", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.BulkUpdateResponseModel" + }, + "example": { + "results": [ + { + "error": { + "code": "string", + "message": "string" + }, + "isSuccess": true, + "shipmentId": 100810005 + } + ], + "summary": { + "failed": 0, + "successful": 1, + "total": 1 + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Post.Api.Shipment.BulkUpdateTrackingUpload.Bad.Request.String" + }, + "example": "string" + } + } + }, + "401": { + "description": "No access right at this time" + }, + "403": { + "description": "No access" + }, + "404": { + "description": "Not Found" + } + }, + "requestBody": { + "x-name": "orders.BulkUpdateTrackingUploadModel", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.BulkUpdateTrackingUploadModel" + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Orders" + ] + } + }, + "/order/{orderId}/store-order-json": { + "get": { + "summary": "Get Order Store Json", + "operationId": "414258524e39b947dc3c3a1cb1238444", + "parameters": [ + { + "name": "orderId", + "in": "path", + "required": true, + "description": "The order ID to Get the JSON Stored", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Get.Api.Order.OrderId.StoreOrderJson.OK.String" + }, + "example": "string" + } + } + }, + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Get.Api.Order.OrderId.StoreOrderJson.Bad.Request.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + }, + "401": { + "description": "No access right at this time" + }, + "403": { + "description": "No access" + }, + "404": { + "description": "Not Found" + }, + "422": { + "description": "Client Error", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Get.Api.Order.OrderId.StoreOrderJson.Unprocessable.Entity.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Orders" + ] + }, + "post": { + "summary": "Save the Store Order Json", + "operationId": "34e752d61489858bcad405acd5192477", + "parameters": [ + { + "name": "orderId", + "in": "path", + "required": true, + "description": "The order ID to Store", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + } + ], + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Post.Api.Order.OrderId.StoreOrderJson.Created.String" + }, + "example": "string" + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Post.Api.Order.OrderId.StoreOrderJson.Bad.Request.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + }, + "401": { + "description": "No access right at this time" + }, + "403": { + "description": "No access" + }, + "404": { + "description": "Not Found" + }, + "422": { + "description": "Client Error", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Post.Api.Order.OrderId.StoreOrderJson.Unprocessable.Entity.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + } + }, + "requestBody": { + "x-name": "orders.AddStoreOrderJsonModel", + "description": "The JSON that represent the order on the Third Party Source", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.AddStoreOrderJsonModel" + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Orders" + ] + } + }, + "/order/{orderId}:cancel": { + "post": { + "summary": "Cancel single Order by Order ID", + "operationId": "81de608a90b49fefd21f436b25cabb9e", + "parameters": [ + { + "name": "orderId", + "in": "path", + "required": true, + "description": "The order ID to cancel", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + }, + { + "name": "shipbob_channel_id", + "in": "header", + "required": true, + "description": "Channel ID for Operation", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.CanceledOrderViewModel" + }, + "example": { + "canceled_shipment_results": [ + { + "action": "Cancel", + "is_success": true, + "reason": "string", + "shipment_id": 0 + } + ], + "order": { + "channel": { + "id": 0, + "name": "ShipBobs-Shopify-Store" + }, + "created_date": "2019-08-24T14:15:22Z", + "financials": { + "total_price": 0.1 + }, + "gift_message": "string", + "id": 0, + "order_number": "string", + "products": [ + { + "external_line_id": 0, + "gtin": "string", + "id": 0, + "quantity": 0, + "quantity_unit_of_measure_code": "string", + "reference_id": "TShirtBlueM", + "sku": "TShirtBlueM", + "unit_price": 0.1, + "upc": "string" + } + ], + "purchase_date": "2019-08-24T14:15:22Z", + "recipient": { + "address": { + "address1": "100 Nowhere Blvd", + "address2": "Suite 100", + "city": "Gotham City", + "company_name": "Wayne Enterprises", + "country": "US", + "state": "NJ", + "zip_code": "07093" + }, + "email": "john@example.com", + "name": "John Doe", + "phone_number": "555-555-5555" + }, + "reference_id": "string", + "retailer_program_data": { + "addresses": [ + { + "address1": "100 Nowhere Blvd", + "address2": "Suite 100", + "city": "Gotham City", + "company_name": "Wayne Enterprises", + "country": "US", + "state": "NJ", + "type": "MarkFor", + "zip_code": "07093" + } + ], + "customer_ticket_number": "string", + "delivery_date": "2019-08-24T14:15:22Z", + "department": "string", + "doNotShipBeforeDate": "2019-08-24T14:15:22Z", + "mark_for_store": "string", + "purchase_order_number": "string", + "retailer_program_type": "string", + "shipByDate": "2019-08-24T14:15:22Z" + }, + "shipments": [ + { + "actual_fulfillment_date": "2019-08-24T14:15:22Z", + "created_date": "2019-08-24T14:15:22Z", + "delivery_date": "2019-08-24T14:15:22Z", + "estimated_fulfillment_date": "2019-08-24T14:15:22Z", + "estimated_fulfillment_date_status": "AwaitingInventoryAllocation", + "gift_message": "string", + "id": 0, + "insurance_value": 0, + "invoice_amount": 0, + "invoice_currency_code": "string", + "is_tracking_uploaded": true, + "last_tracking_update_at": "2019-08-24T14:15:22Z", + "last_update_at": "2019-08-24T14:15:22Z", + "location": { + "id": 0, + "name": "Cicero (IL)" + }, + "measurements": { + "depth_in": 0, + "length_in": 0, + "total_weight_oz": 0, + "width_in": 0 + }, + "order_id": 0, + "package_material_type": "Unknown", + "parent_cartons": [ + { + "barcode": "string", + "cartons": [ + { + "barcode": "string", + "carton_details": [ + { + "products": [ + { + "id": 0, + "inventory_items": [ + { + "expiration_date": "2019-08-24T14:15:22Z", + "id": 0, + "is_dangerous_goods": true, + "lot": "22222", + "name": "Medium Blue T-Shirt", + "quantity": 0, + "quantity_committed": 0, + "serial_numbers": [ + null + ] + } + ], + "name": "Medium Blue T-Shirt", + "reference_id": "TShirtBlueM", + "sku": "TShirtBlueM" + } + ] + } + ], + "id": 0, + "measurements": { + "depth_in": 0.1, + "length_in": 0.1, + "total_weight_oz": 0.1, + "width_in": 0.1 + }, + "type": "Box or pallet" + } + ], + "measurements": { + "depth_in": 0.1, + "length_in": 0.1, + "total_weight_oz": 0.1, + "width_in": 0.1 + }, + "type": "Box or pallet" + } + ], + "products": [ + { + "id": 0, + "inventory_items": [ + { + "expiration_date": "2019-08-24T14:15:22Z", + "id": 0, + "is_dangerous_goods": true, + "lot": "22222", + "name": "Medium Blue T-Shirt", + "quantity": 0, + "quantity_committed": 0, + "serial_numbers": [ + "string" + ] + } + ], + "name": "Medium Blue T-Shirt", + "reference_id": "TShirtBlueM", + "sku": "TShirtBlueM" + } + ], + "recipient": { + "address": { + "address1": "100 Nowhere Blvd", + "address2": "Suite 100", + "city": "Gotham City", + "company_name": "Wayne Enterprises", + "country": "US", + "state": "NJ", + "zip_code": "07093" + }, + "email": "john@example.com", + "full_name": "John Doe", + "name": "John Doe", + "phone_number": "555-555-5555" + }, + "reference_id": "string", + "require_signature": true, + "ship_option": "Standard", + "status": "None", + "status_details": [ + { + "description": "string", + "exception_fulfillment_center_id": 0, + "extra_information": { + "validation_messages": [ + "string" + ] + }, + "id": 0, + "inventory_id": 0, + "name": "string" + } + ], + "tracking": { + "bol": "string", + "carrier": "USPS", + "carrier_service": "Priority", + "pro_number": "string", + "scac": "string", + "shipping_date": "2019-08-24T14:15:22Z", + "tracking_number": "860C8CDC8F0B4FC7AB69AC86C20539EC", + "tracking_url": "https://www.example.com/tracking?id=860C8CDC8F0B4FC7AB69AC86C20539EC" + } + } + ], + "shipping_method": "Free 2-day Shipping", + "shipping_terms": { + "carrier_type": "Parcel", + "payment_term": "Collect" + }, + "status": "Processing", + "tags": [ + { + "name": "Handling instructions", + "value": "Fragile" + } + ], + "type": "DTC" + }, + "order_id": 0, + "status": "Success" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Post.Api.Order.OrderId.Cancel.Bad.Request.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + }, + "401": { + "description": "No access right at this time" + }, + "403": { + "description": "No access" + }, + "404": { + "description": "Not Found" + }, + "422": { + "description": "Client Error", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Post.Api.Order.OrderId.Cancel.Unprocessable.Entity.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + }, + "500": { + "description": "Server Error", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Post.Api.Order.OrderId.Cancel.Internal.Server.Error.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Orders" + ] + } + }, + "/order:estimate": { + "post": { + "summary": "Estimate Fulfillment Cost For Order", + "description": "This endpoint will provide, where possible, an estimate of pricing and fulfillment center assignment of a potential standard (direct to consumer) order. Keep in mind that there are ways for the merchant to change FC assignment or product configuration after order creation that could invalidate this estimate. Estimates cannot be returned for items that are unknown, out of stock, or too large for fulfillment using standard box sizes. Additional services such as high-pick fees, shipping insurance, auto-splitting or auto-adding items to orders, and signature required are not included in this estimate.", + "operationId": "ead592f20ff455d472d4e2f68613f881", + "parameters": [ + { + "name": "shipbob_channel_id", + "in": "header", + "required": true, + "description": "Channel Id for Operation", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.EstimateViewModel" + }, + "example": { + "estimates": [ + { + "estimated_currency_code": "string", + "estimated_price": 0.1, + "fulfillment_center": { + "id": 0, + "name": "Cicero (IL)" + }, + "shipping_method": "string", + "total_weight_oz": 0.1 + } + ] + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Post.Api.Order.Estimate.Bad.Request.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + }, + "401": { + "description": "No access right at this time" + }, + "403": { + "description": "No access" + }, + "422": { + "description": "Client Error", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Post.Api.Order.Estimate.Unprocessable.Entity.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + } + }, + "requestBody": { + "x-name": "orders.EstimateFulfillmentRequestModel", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.EstimateFulfillmentRequestModel" + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Orders" + ] + } + }, + "/order/{orderId}/shipment/{shipmentId}:cancel": { + "post": { + "summary": "Cancel one Shipment by Order Id and Shipment Id", + "operationId": "390660c04540bd7106f681e71a45ad41", + "parameters": [ + { + "name": "shipmentId", + "in": "path", + "required": true, + "description": "The shipment id to get", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + }, + { + "name": "orderId", + "in": "path", + "required": true, + "description": "", + "schema": { + "type": "string", + "additionalProperties": false + } + }, + { + "name": "shipbob_channel_id", + "in": "header", + "description": "Channel Id for Operation", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Post.Api.Order.OrderId.Shipment.ShipmentId.Cancel.OK.OneOf.ShipmentViewModel.InternalShipmentViewModel" + }, + "example": { + "actual_fulfillment_date": "2019-08-24T14:15:22Z", + "created_date": "2019-08-24T14:15:22Z", + "delivery_date": "2019-08-24T14:15:22Z", + "estimated_fulfillment_date": "2019-08-24T14:15:22Z", + "estimated_fulfillment_date_status": "AwaitingInventoryAllocation", + "gift_message": "string", + "id": 0, + "insurance_value": 0, + "invoice_amount": 0, + "invoice_currency_code": "string", + "is_tracking_uploaded": true, + "last_tracking_update_at": "2019-08-24T14:15:22Z", + "last_update_at": "2019-08-24T14:15:22Z", + "location": { + "id": 0, + "name": "Cicero (IL)" + }, + "measurements": { + "depth_in": 0, + "length_in": 0, + "total_weight_oz": 0, + "width_in": 0 + }, + "order_id": 0, + "package_material_type": "Unknown", + "parent_cartons": [ + { + "barcode": "string", + "cartons": [ + { + "barcode": "string", + "carton_details": [ + { + "products": [ + { + "id": 0, + "inventory_items": [ + { + "expiration_date": "2019-08-24T14:15:22Z", + "id": 0, + "is_dangerous_goods": true, + "lot": "22222", + "name": "Medium Blue T-Shirt", + "quantity": 0, + "quantity_committed": 0, + "serial_numbers": [ + "string" + ] + } + ], + "name": "Medium Blue T-Shirt", + "reference_id": "TShirtBlueM", + "sku": "TShirtBlueM" + } + ] + } + ], + "id": 0, + "measurements": { + "depth_in": 0.1, + "length_in": 0.1, + "total_weight_oz": 0.1, + "width_in": 0.1 + }, + "type": "Box or pallet" + } + ], + "measurements": { + "depth_in": 0.1, + "length_in": 0.1, + "total_weight_oz": 0.1, + "width_in": 0.1 + }, + "type": "Box or pallet" + } + ], + "products": [ + { + "id": 0, + "inventory_items": [ + { + "expiration_date": "2019-08-24T14:15:22Z", + "id": 0, + "is_dangerous_goods": true, + "lot": "22222", + "name": "Medium Blue T-Shirt", + "quantity": 0, + "quantity_committed": 0, + "serial_numbers": [ + "string" + ] + } + ], + "name": "Medium Blue T-Shirt", + "reference_id": "TShirtBlueM", + "sku": "TShirtBlueM" + } + ], + "recipient": { + "address": { + "address1": "100 Nowhere Blvd", + "address2": "Suite 100", + "city": "Gotham City", + "company_name": "Wayne Enterprises", + "country": "US", + "state": "NJ", + "zip_code": "07093" + }, + "email": "john@example.com", + "full_name": "John Doe", + "name": "John Doe", + "phone_number": "555-555-5555" + }, + "reference_id": "string", + "require_signature": true, + "ship_option": "Standard", + "status": "None", + "status_details": [ + { + "description": "string", + "exception_fulfillment_center_id": 0, + "extra_information": { + "validation_messages": [ + "string" + ] + }, + "id": 0, + "inventory_id": 0, + "name": "string" + } + ], + "tracking": { + "bol": "string", + "carrier": "USPS", + "carrier_service": "Priority", + "pro_number": "string", + "scac": "string", + "shipping_date": "2019-08-24T14:15:22Z", + "tracking_number": "860C8CDC8F0B4FC7AB69AC86C20539EC", + "tracking_url": "https://www.example.com/tracking?id=860C8CDC8F0B4FC7AB69AC86C20539EC" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Post.Api.Order.OrderId.Shipment.ShipmentId.Cancel.Bad.Request.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + }, + "401": { + "description": "No access right at this time" + }, + "403": { + "description": "No access" + }, + "404": { + "description": "Not Found" + }, + "422": { + "description": "Client Error", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Post.Api.Order.OrderId.Shipment.ShipmentId.Cancel.Unprocessable.Entity.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + }, + "500": { + "description": "Server Error", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Post.Api.Order.OrderId.Shipment.ShipmentId.Cancel.Internal.Server.Error.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Orders" + ] + } + }, + "/shipping-method": { + "get": { + "summary": "Get shipping methods", + "description": "Get all merchants shipping methods", + "operationId": "18d1ac7f574de5301c160d7cd0e946a7", + "parameters": [ + { + "name": "Page", + "in": "query", + "description": "Page of orders to get", + "schema": { + "type": "number", + "format": "int32", + "maximum": 2147483647.0, + "minimum": 0.0, + "additionalProperties": false + } + }, + { + "name": "Limit", + "in": "query", + "description": "Amount of records per page to request", + "schema": { + "type": "number", + "format": "int32", + "maximum": 250.0, + "minimum": 1.0, + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.ShipMethodDetailViewModelArray" + }, + "example": [ + { + "active": true, + "default": true, + "id": 0, + "name": "string", + "service_level": { + "id": 0, + "name": "string" + } + } + ] + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Get.Api.Shippingmethod.Bad.Request.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + }, + "401": { + "description": "No access right at this time" + }, + "403": { + "description": "No access" + }, + "422": { + "description": "Client Error", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Get.Api.Shippingmethod.Unprocessable.Entity.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Orders" + ] + } + }, + "/shipment/{shipmentId}:cancel": { + "post": { + "summary": "Cancel one Shipment by Shipment Id", + "operationId": "6b9a94fb7e9f65e6d3599a4b1a4d3840", + "parameters": [ + { + "name": "shipmentId", + "in": "path", + "required": true, + "description": "The shipment id to get", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + }, + { + "name": "shipbob_channel_id", + "in": "header", + "description": "Channel Id for Operation", + "schema": { + "type": "string", + "format": "int32", + "additionalProperties": false + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Post.Api.Shipment.ShipmentId.Cancel.OK.OneOf.ShipmentViewModel.InternalShipmentViewModel" + }, + "example": { + "actual_fulfillment_date": "2019-08-24T14:15:22Z", + "created_date": "2019-08-24T14:15:22Z", + "delivery_date": "2019-08-24T14:15:22Z", + "estimated_fulfillment_date": "2019-08-24T14:15:22Z", + "estimated_fulfillment_date_status": "AwaitingInventoryAllocation", + "gift_message": "string", + "id": 0, + "insurance_value": 0, + "invoice_amount": 0, + "invoice_currency_code": "string", + "is_tracking_uploaded": true, + "last_tracking_update_at": "2019-08-24T14:15:22Z", + "last_update_at": "2019-08-24T14:15:22Z", + "location": { + "id": 0, + "name": "Cicero (IL)" + }, + "measurements": { + "depth_in": 0, + "length_in": 0, + "total_weight_oz": 0, + "width_in": 0 + }, + "order_id": 0, + "package_material_type": "Unknown", + "parent_cartons": [ + { + "barcode": "string", + "cartons": [ + { + "barcode": "string", + "carton_details": [ + { + "products": [ + { + "id": 0, + "inventory_items": [ + { + "expiration_date": "2019-08-24T14:15:22Z", + "id": 0, + "is_dangerous_goods": true, + "lot": "22222", + "name": "Medium Blue T-Shirt", + "quantity": 0, + "quantity_committed": 0, + "serial_numbers": [ + "string" + ] + } + ], + "name": "Medium Blue T-Shirt", + "reference_id": "TShirtBlueM", + "sku": "TShirtBlueM" + } + ] + } + ], + "id": 0, + "measurements": { + "depth_in": 0.1, + "length_in": 0.1, + "total_weight_oz": 0.1, + "width_in": 0.1 + }, + "type": "Box or pallet" + } + ], + "measurements": { + "depth_in": 0.1, + "length_in": 0.1, + "total_weight_oz": 0.1, + "width_in": 0.1 + }, + "type": "Box or pallet" + } + ], + "products": [ + { + "id": 0, + "inventory_items": [ + { + "expiration_date": "2019-08-24T14:15:22Z", + "id": 0, + "is_dangerous_goods": true, + "lot": "22222", + "name": "Medium Blue T-Shirt", + "quantity": 0, + "quantity_committed": 0, + "serial_numbers": [ + "string" + ] + } + ], + "name": "Medium Blue T-Shirt", + "reference_id": "TShirtBlueM", + "sku": "TShirtBlueM" + } + ], + "recipient": { + "address": { + "address1": "100 Nowhere Blvd", + "address2": "Suite 100", + "city": "Gotham City", + "company_name": "Wayne Enterprises", + "country": "US", + "state": "NJ", + "zip_code": "07093" + }, + "email": "john@example.com", + "full_name": "John Doe", + "name": "John Doe", + "phone_number": "555-555-5555" + }, + "reference_id": "string", + "require_signature": true, + "ship_option": "Standard", + "status": "None", + "status_details": [ + { + "description": "string", + "exception_fulfillment_center_id": 0, + "extra_information": { + "validation_messages": [ + "string" + ] + }, + "id": 0, + "inventory_id": 0, + "name": "string" + } + ], + "tracking": { + "bol": "string", + "carrier": "USPS", + "carrier_service": "Priority", + "pro_number": "string", + "scac": "string", + "shipping_date": "2019-08-24T14:15:22Z", + "tracking_number": "860C8CDC8F0B4FC7AB69AC86C20539EC", + "tracking_url": "https://www.example.com/tracking?id=860C8CDC8F0B4FC7AB69AC86C20539EC" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Post.Api.Shipment.ShipmentId.Cancel.Bad.Request.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + }, + "401": { + "description": "No access right at this time" + }, + "403": { + "description": "No access" + }, + "404": { + "description": "Not Found" + }, + "422": { + "description": "Client Error", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Post.Api.Shipment.ShipmentId.Cancel.Unprocessable.Entity.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + }, + "500": { + "description": "Server Error", + "content": { + "application/json": { + "schema": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Post.Api.Shipment.ShipmentId.Cancel.Internal.Server.Error.Object" + }, + "example": { + "property1": [ + "string" + ], + "property2": [ + "string" + ] + } + } + } + } + }, + "security": [ + { + "PAT": [] + }, + { + "OAuth2": [] + } + ], + "tags": [ + "Orders" + ] + } + } + }, + "components": { + "schemas": { + "Billing.Get.Api.V3.Invoices.Cursor.String": { + "type": "string", + "additionalProperties": false + }, + "Billing.Get.Api.V3.Invoices.FromDate.String": { + "type": "string", + "format": "date-time", + "additionalProperties": false + }, + "Billing.Get.Api.V3.Invoices.InvoiceId.Transactions.Cursor.String": { + "type": "string", + "additionalProperties": false + }, + "Billing.Get.Api.V3.Invoices.InvoiceId.Transactions.InvoiceId.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Billing.Get.Api.V3.Invoices.InvoiceId.Transactions.PageSize.Integer": { + "type": "integer", + "format": "int32", + "default": 100, + "additionalProperties": false + }, + "Billing.Get.Api.V3.Invoices.InvoiceTypes.StringArray": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + }, + "Billing.Get.Api.V3.Invoices.PageSize.Integer": { + "type": "integer", + "format": "int32", + "default": 100, + "additionalProperties": false + }, + "Billing.Get.Api.V3.Invoices.ToDate.String": { + "type": "string", + "format": "date-time", + "additionalProperties": false + }, + "Billing.InvoiceDto": { + "type": "object", + "description": "Data transfer object representing an invoice.", + "additionalProperties": false, + "properties": { + "amount": { + "type": "number", + "description": "The total invoice amount.", + "format": "double", + "example": 0.01, + "additionalProperties": false + }, + "currencyCode": { + "type": "string", + "description": "The ISO currency code used in the invoice (e.g., USD, EUR).", + "example": "USD", + "additionalProperties": false, + "nullable": true + }, + "invoiceDate": { + "type": "string", + "description": "The invoice date in yyyy-mm-dd format.", + "additionalProperties": false, + "nullable": true + }, + "invoiceId": { + "type": "integer", + "description": "Unique identifier for the invoice.", + "format": "int32", + "example": 12345, + "additionalProperties": false + }, + "invoiceType": { + "type": "string", + "description": "The type or category of the invoice. Available options:\r\n- Shipping \r\n- Inbound Fee \r\n- WarehouseStorage \r\n- AdditionalFee \r\n- Return \r\n- Credits \r\n- BalanceAdjustment \r\n- Payment", + "additionalProperties": false, + "nullable": true + }, + "runningBalance": { + "type": "number", + "description": "The running balance of the account after this invoice is applied.", + "format": "double", + "example": 123.01, + "additionalProperties": false + } + } + }, + "Billing.InvoiceDtoCursorPagedResponse": { + "type": "object", + "additionalProperties": false, + "properties": { + "first": { + "type": "string", + "description": "Go to the first page", + "additionalProperties": false, + "nullable": true + }, + "items": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Billing.InvoiceDto" + }, + "nullable": true + }, + "last": { + "type": "string", + "description": "Go to the Last page", + "additionalProperties": false, + "nullable": true + }, + "next": { + "type": "string", + "description": "Go to the Next page", + "additionalProperties": false, + "nullable": true + }, + "prev": { + "type": "string", + "description": "Go to the Previous page", + "additionalProperties": false, + "nullable": true + } + } + }, + "Billing.InvoiceDtoCursorPagedResponseV3": { + "type": "object", + "additionalProperties": false, + "properties": { + "first": { + "type": "string", + "description": "Go to the first page", + "additionalProperties": false, + "nullable": true + }, + "items": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Billing.InvoiceDtoV3" + }, + "nullable": true + }, + "last": { + "type": "string", + "description": "Go to the Last page", + "additionalProperties": false, + "nullable": true + }, + "next": { + "type": "string", + "description": "Go to the Next page", + "additionalProperties": false, + "nullable": true + }, + "prev": { + "type": "string", + "description": "Go to the Previous page", + "additionalProperties": false, + "nullable": true + } + } + }, + "Billing.InvoiceDtoV3": { + "type": "object", + "description": "Data transfer object representing an invoice.", + "additionalProperties": false, + "properties": { + "amount": { + "type": "number", + "description": "The total invoice amount.", + "format": "double", + "example": 0.01, + "additionalProperties": false + }, + "currency_code": { + "type": "string", + "description": "The ISO currency code used in the invoice (e.g., USD, EUR).", + "example": "USD", + "additionalProperties": false, + "nullable": true + }, + "invoice_date": { + "type": "string", + "description": "The invoice date in yyyy-mm-dd format.", + "additionalProperties": false, + "nullable": true + }, + "invoice_id": { + "type": "integer", + "description": "Unique identifier for the invoice.", + "format": "int32", + "example": 12345, + "additionalProperties": false + }, + "invoice_type": { + "type": "string", + "description": "The type or category of the invoice. Available options:\r\n- Shipping \r\n- Inbound Fee \r\n- WarehouseStorage \r\n- AdditionalFee \r\n- Return \r\n- Credits \r\n- BalanceAdjustment \r\n- Payment", + "additionalProperties": false, + "nullable": true + }, + "running_balance": { + "type": "number", + "description": "The running balance of the account after this invoice is applied.", + "format": "double", + "example": 123.01, + "additionalProperties": false + } + } + }, + "Billing.InvoiceTaxDto": { + "type": "object", + "additionalProperties": false, + "properties": { + "taxAmount": { + "type": "number", + "description": "Tax amount charged for the tax type.", + "format": "double", + "example": 0.01, + "additionalProperties": false + }, + "taxRate": { + "type": "number", + "description": "Rate of Tax charged for the tax type", + "format": "double", + "example": 10, + "additionalProperties": false + }, + "taxType": { + "type": "string", + "description": "Type of tax charged for eg. GST", + "example": "GST", + "additionalProperties": false, + "nullable": true + } + } + }, + "Billing.InvoiceTaxDtoV3": { + "type": "object", + "additionalProperties": false, + "properties": { + "tax_amount": { + "type": "number", + "description": "Tax amount charged for the tax type.", + "format": "double", + "example": 0.01, + "additionalProperties": false + }, + "tax_rate": { + "type": "number", + "description": "Rate of Tax charged for the tax type", + "format": "double", + "example": 10, + "additionalProperties": false + }, + "tax_type": { + "type": "string", + "description": "Type of tax charged for eg. GST", + "example": "GST", + "additionalProperties": false, + "nullable": true + } + } + }, + "Billing.Post.Api.V3.Transactions.Query.Cursor.String": { + "type": "string", + "additionalProperties": false + }, + "Billing.ProblemDetails": { + "type": "object", + "additionalProperties": { + "additionalProperties": false + }, + "properties": { + "detail": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "instance": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "status": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "title": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "type": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Billing.SortOrder": { + "type": "string", + "additionalProperties": false, + "enum": [ + "Ascending", + "Descending" + ] + }, + "Billing.TransactionDto": { + "type": "object", + "description": "Represents a transaction data object.", + "additionalProperties": false, + "properties": { + "additionalDetails": { + "type": "object", + "description": "Any additional details related to the transaction in a key-value pair format.", + "additionalProperties": { + "additionalProperties": false, + "nullable": true + }, + "nullable": true + }, + "amount": { + "type": "number", + "description": "Charge Amount for the transaction", + "format": "double", + "example": 0.09, + "additionalProperties": false, + "nullable": true + }, + "chargeDate": { + "type": "string", + "description": "The Charge date of transaction", + "example": "2025-01-01", + "additionalProperties": false, + "nullable": true + }, + "currencyCode": { + "type": "string", + "description": "The ISO currency code (e.g., USD, EUR) for the transaction.", + "example": "USD", + "additionalProperties": false, + "nullable": true + }, + "fulfillmentCenter": { + "type": "string", + "description": "The name or code of the fulfillment center involved in the transaction.", + "example": "Altona VIC", + "additionalProperties": false, + "nullable": true + }, + "invoiceDate": { + "type": "string", + "description": "The date the invoice was generated.", + "example": "2025-01-01", + "additionalProperties": false, + "nullable": true + }, + "invoiceId": { + "type": "integer", + "description": "The unique identifier of the related invoice.", + "format": "int32", + "example": 12345, + "additionalProperties": false, + "nullable": true + }, + "invoiceType": { + "type": "string", + "description": "The type or category of the invoice. Available options:\r\n- Shipping \r\n- Inbound Fee \r\n- WarehouseStorage \r\n- AdditionalFee \r\n- Return \r\n- Credits \r\n- BalanceAdjustment \r\n- Payment", + "example": "Shipping", + "additionalProperties": false, + "nullable": true + }, + "invoicedStatus": { + "type": "boolean", + "additionalProperties": false, + "nullable": true + }, + "referenceId": { + "type": "string", + "description": "A unique reference identifier associated with the transaction.", + "example": "12345", + "additionalProperties": false, + "nullable": true + }, + "referenceType": { + "type": "string", + "description": "The type of reference associated with the ReferenceId. Available options:\r\n- Shipment \r\n- Return \r\n- WRO \r\n- URO \r\n- Ticket Number \r\n- FC \r\n- LPN Reference \r\n- Transfer Plan", + "example": "Shipment", + "additionalProperties": false, + "nullable": true + }, + "taxes": { + "type": "array", + "description": "A list of tax details applied to the transaction if exists.", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Billing.InvoiceTaxDto" + }, + "nullable": true + }, + "transactionFee": { + "type": "string", + "description": "The fee type associated with the transaction for eg. Shipping fees\r\nTo get all the available transaction fees use the endpoint - '/transaction-fees'", + "example": "Shipping", + "additionalProperties": false, + "nullable": true + }, + "transactionType": { + "type": "string", + "description": "The classification or nature of the transaction \r\nTransaction Types - Charge, Refund, Credit, Payment, BalanceAdjustment", + "example": "Charge", + "additionalProperties": false, + "nullable": true + } + } + }, + "Billing.TransactionDtoCursorPagedResponse": { + "type": "object", + "additionalProperties": false, + "properties": { + "first": { + "type": "string", + "description": "Go to the first page", + "additionalProperties": false, + "nullable": true + }, + "items": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Billing.TransactionDto" + }, + "nullable": true + }, + "last": { + "type": "string", + "description": "Go to the Last page", + "additionalProperties": false, + "nullable": true + }, + "next": { + "type": "string", + "description": "Go to the Next page", + "additionalProperties": false, + "nullable": true + }, + "prev": { + "type": "string", + "description": "Go to the Previous page", + "additionalProperties": false, + "nullable": true + } + } + }, + "Billing.TransactionDtoCursorPagedResponseV3": { + "type": "object", + "additionalProperties": false, + "properties": { + "first": { + "type": "string", + "description": "Go to the first page", + "additionalProperties": false, + "nullable": true + }, + "items": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Billing.TransactionDtoV3" + }, + "nullable": true + }, + "last": { + "type": "string", + "description": "Go to the Last page", + "additionalProperties": false, + "nullable": true + }, + "next": { + "type": "string", + "description": "Go to the Next page", + "additionalProperties": false, + "nullable": true + }, + "prev": { + "type": "string", + "description": "Go to the Previous page", + "additionalProperties": false, + "nullable": true + } + } + }, + "Billing.TransactionDtoV3": { + "type": "object", + "description": "Represents a transaction data object.", + "additionalProperties": false, + "properties": { + "additional_details": { + "type": "object", + "description": "Any additional details related to the transaction in a key-value pair format.", + "additionalProperties": { + "additionalProperties": false, + "nullable": true + }, + "nullable": true + }, + "amount": { + "type": "number", + "description": "Charge Amount for the transaction", + "format": "double", + "example": 0.09, + "additionalProperties": false, + "nullable": true + }, + "charge_date": { + "type": "string", + "description": "The Charge date of transaction", + "example": "2025-01-01", + "additionalProperties": false, + "nullable": true + }, + "currency_code": { + "type": "string", + "description": "The ISO currency code (e.g., USD, EUR) for the transaction.", + "example": "USD", + "additionalProperties": false, + "nullable": true + }, + "fulfillment_center": { + "type": "string", + "description": "The name or code of the fulfillment center involved in the transaction.", + "example": "Altona VIC", + "additionalProperties": false, + "nullable": true + }, + "invoice_date": { + "type": "string", + "description": "The date the invoice was generated.", + "example": "2025-01-01", + "additionalProperties": false, + "nullable": true + }, + "invoice_id": { + "type": "integer", + "description": "The unique identifier of the related invoice.", + "format": "int32", + "example": 12345, + "additionalProperties": false, + "nullable": true + }, + "invoice_type": { + "type": "string", + "description": "The type or category of the invoice. Available options:\r\n- Shipping \r\n- Inbound Fee \r\n- WarehouseStorage \r\n- AdditionalFee \r\n- Return \r\n- Credits \r\n- BalanceAdjustment \r\n- Payment", + "example": "Shipping", + "additionalProperties": false, + "nullable": true + }, + "invoiced_status": { + "type": "boolean", + "additionalProperties": false, + "nullable": true + }, + "reference_id": { + "type": "string", + "description": "A unique reference identifier associated with the transaction.", + "example": "12345", + "additionalProperties": false, + "nullable": true + }, + "reference_type": { + "type": "string", + "description": "The type of reference associated with the ReferenceId. Available options:\r\n- Shipment \r\n- Return \r\n- WRO \r\n- URO \r\n- Ticket Number \r\n- FC \r\n- LPN Reference \r\n- Transfer Plan", + "example": "Shipment", + "additionalProperties": false, + "nullable": true + }, + "taxes": { + "type": "array", + "description": "A list of tax details applied to the transaction if exists.", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Billing.InvoiceTaxDtoV3" + }, + "nullable": true + }, + "transaction_fee": { + "type": "string", + "description": "The fee type associated with the transaction for eg. Shipping fees\r\nTo get all the available transaction fees use the endpoint - '/transaction-fees'", + "example": "Shipping", + "additionalProperties": false, + "nullable": true + }, + "transaction_type": { + "type": "string", + "description": "The classification or nature of the transaction \r\nTransaction Types - Charge, Refund, Credit, Payment, BalanceAdjustment", + "example": "Charge", + "additionalProperties": false, + "nullable": true + } + } + }, + "Billing.TransactionFeeModelV2": { + "type": "object", + "additionalProperties": false, + "properties": { + "feeList": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + }, + "nullable": true + } + } + }, + "Billing.TransactionFeeModelV3": { + "type": "object", + "additionalProperties": false, + "properties": { + "fee_list": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + }, + "nullable": true + } + } + }, + "Billing.TransactionRequestFilterV3": { + "type": "object", + "example": { + "from_date": "2019-08-24", + "invoice_ids": [ + "12345" + ], + "invoiced_status": true, + "page_size": 10, + "reference_ids": [ + "11553288", + "43-12000928-Pallet00" + ], + "reference_types": [ + "FC" + ], + "sort_order": "Ascending", + "to_date": "2019-08-24", + "transaction_fees": [ + "Kitting Fee", + "Warehousing Fee" + ], + "transaction_types": [ + "Charge" + ] + }, + "additionalProperties": false, + "properties": { + "from_date": { + "type": "string", + "description": "Start date for filtering transactions by transaction charge date.", + "format": "date-time", + "additionalProperties": false, + "nullable": true + }, + "invoice_ids": { + "type": "array", + "description": "List of invoice IDs to filter transactions", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + }, + "nullable": true + }, + "invoiced_status": { + "type": "boolean", + "description": "Filter Transactions by invoicing status:\r\n- True(Billed Transactions)\r\n- False(Unbilled Transactions)\r\n- null (Billed + Unbilled Transactions)", + "additionalProperties": false, + "nullable": true + }, + "page_size": { + "type": "integer", + "description": "Number of transactions to return per page (default is 100, to be entered when API is called for first time). Must be between 1 and 1000.", + "format": "int32", + "additionalProperties": false + }, + "reference_ids": { + "type": "array", + "description": "List of reference IDs (like Shipment ID, WRO id) to filter transactions (can be numeric or string identifiers).", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + }, + "nullable": true + }, + "reference_types": { + "type": "array", + "description": "The type of reference associated with the ReferenceId. Available options:\r\n- Shipment \r\n- Return \r\n- WRO \r\n- URO", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + }, + "nullable": true + }, + "sort_order": { + "additionalProperties": false, + "$ref": "#/components/schemas/Billing.SortOrder" + }, + "to_date": { + "type": "string", + "description": "End date for filtering transactions by transaction charge date.", + "format": "date-time", + "additionalProperties": false, + "nullable": true + }, + "transaction_fees": { + "type": "array", + "description": "

To get all the available transaction fees use this endpoint:- '/transaction-fees'

", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + }, + "nullable": true + }, + "transaction_types": { + "type": "array", + "description": "The classification or nature of the transaction \r\nTransaction Types - Charge, Refund, Credit, Payment, BalanceAdjustment", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + }, + "nullable": true + } + } + }, + "Channels.ChannelViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "application_name": { + "type": "string", + "description": "Name of the application that owns the channel", + "example": "Api", + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "integer", + "description": "Unique id of the channel", + "format": "int32", + "additionalProperties": false + }, + "name": { + "type": "string", + "description": "Name of the channel", + "additionalProperties": false, + "nullable": true + }, + "scopes": { + "type": "array", + "description": "Array of permissions granted for the channel", + "example": [ + "channels_read", + "orders_read", + "orders_write" + ], + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + }, + "nullable": true + } + } + }, + "Channels.ChannelsV2ViewModel": { + "type": "object", + "description": "Get Channels response", + "additionalProperties": false, + "properties": { + "items": { + "type": "array", + "description": "List of channels", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Channels.ChannelViewModel" + }, + "nullable": true + }, + "next": { + "type": "string", + "description": "Next page url", + "additionalProperties": false, + "nullable": true + }, + "prev": { + "type": "string", + "description": "Previous page url", + "additionalProperties": false, + "nullable": true + } + } + }, + "Channels.CreateChannelRequestModel": { + "type": "object", + "description": "Model for create channel request", + "example": { + "name": "string" + }, + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "description": "Name of the channel", + "minLength": 1, + "additionalProperties": false + } + } + }, + "Channels.ErrorResponse": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Inventory.DimensionsResponse": { + "type": "object", + "additionalProperties": false, + "properties": { + "height": { + "type": "number", + "format": "double", + "additionalProperties": false + }, + "is_locked": { + "type": "boolean", + "additionalProperties": false + }, + "length": { + "type": "number", + "format": "double", + "additionalProperties": false + }, + "unit": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "validated": { + "type": "boolean", + "additionalProperties": false + }, + "width": { + "type": "number", + "format": "double", + "additionalProperties": false + } + } + }, + "Inventory.FilterOperation": { + "type": "object", + "additionalProperties": false, + "properties": { + "key": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "rawValue": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Inventory.FilterOperationArray": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.FilterOperation" + } + }, + "Inventory.FulfillableQuantityByFulfillmentCenter": { + "type": "object", + "additionalProperties": false, + "properties": { + "awaiting_quantity": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "committed_quantity": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "fulfillable_quantity": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "internal_transfer_quantity": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "location_id": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "name": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "on_hand_quantity": { + "type": "integer", + "format": "int32", + "additionalProperties": false + } + } + }, + "Inventory.FulfillmentCenterResponse": { + "type": "object", + "additionalProperties": false, + "properties": { + "awaiting_quantity": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "committed_quantity": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "fulfillable_quantity": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "internal_transfer_quantity": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "location_id": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "name": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "on_hand_quantity": { + "type": "integer", + "format": "int32", + "additionalProperties": false + } + } + }, + "Inventory.Get.Api.V3.Inventories.InventoryId.InventoryId.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Inventory.Get.Api.V3.Inventories.InventoryIds.IntegerArray": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "integer", + "format": "int32", + "additionalProperties": false + } + }, + "Inventory.Get.Api.V3.Inventories.IsActive.Boolean": { + "type": "boolean", + "additionalProperties": false + }, + "Inventory.Get.Api.V3.Inventories.IsDigital.Boolean": { + "type": "boolean", + "additionalProperties": false + }, + "Inventory.Get.Api.V3.Inventories.PageSize.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Inventory.Get.Api.V3.Inventories.SearchBy.String": { + "type": "string", + "additionalProperties": false + }, + "Inventory.Get.Api.V3.Inventories.SortBy.String": { + "type": "string", + "additionalProperties": false + }, + "Inventory.Get.Api.V3.Inventory.Levels.InventoryId.InventoryId.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Inventory.Get.Api.V3.Inventory.Levels.InventoryId.Locations.InventoryId.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Inventory.Get.Api.V3.Inventory.Levels.InventoryId.Lots.InventoryId.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Inventory.Get.Api.V3.Inventory.Levels.InventoryIds.IntegerArray": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "integer", + "format": "int32", + "additionalProperties": false + } + }, + "Inventory.Get.Api.V3.Inventory.Levels.IsActive.Boolean": { + "type": "boolean", + "additionalProperties": false + }, + "Inventory.Get.Api.V3.Inventory.Levels.IsDigital.Boolean": { + "type": "boolean", + "additionalProperties": false + }, + "Inventory.Get.Api.V3.Inventory.Levels.Locations.InventoryIds.IntegerArray": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "integer", + "format": "int32", + "additionalProperties": false + } + }, + "Inventory.Get.Api.V3.Inventory.Levels.Locations.IsActive.Boolean": { + "type": "boolean", + "additionalProperties": false + }, + "Inventory.Get.Api.V3.Inventory.Levels.Locations.IsDigital.Boolean": { + "type": "boolean", + "additionalProperties": false + }, + "Inventory.Get.Api.V3.Inventory.Levels.Locations.LocationId.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Inventory.Get.Api.V3.Inventory.Levels.Locations.LocationType.String": { + "type": "string", + "additionalProperties": false + }, + "Inventory.Get.Api.V3.Inventory.Levels.Locations.PageSize.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Inventory.Get.Api.V3.Inventory.Levels.Locations.SearchBy.String": { + "type": "string", + "additionalProperties": false + }, + "Inventory.Get.Api.V3.Inventory.Levels.Locations.SortBy.String": { + "type": "string", + "additionalProperties": false + }, + "Inventory.Get.Api.V3.Inventory.Levels.Lots.InventoryIds.IntegerArray": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "integer", + "format": "int32", + "additionalProperties": false + } + }, + "Inventory.Get.Api.V3.Inventory.Levels.Lots.IsActive.Boolean": { + "type": "boolean", + "additionalProperties": false + }, + "Inventory.Get.Api.V3.Inventory.Levels.Lots.IsDigital.Boolean": { + "type": "boolean", + "additionalProperties": false + }, + "Inventory.Get.Api.V3.Inventory.Levels.Lots.LocationId.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Inventory.Get.Api.V3.Inventory.Levels.Lots.PageSize.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Inventory.Get.Api.V3.Inventory.Levels.Lots.SearchBy.String": { + "type": "string", + "additionalProperties": false + }, + "Inventory.Get.Api.V3.Inventory.Levels.Lots.SortBy.String": { + "type": "string", + "additionalProperties": false + }, + "Inventory.Get.Api.V3.Inventory.Levels.PageSize.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Inventory.Get.Api.V3.Inventory.Levels.SearchBy.String": { + "type": "string", + "additionalProperties": false + }, + "Inventory.Get.Api.V3.Inventory.Levels.SortBy.String": { + "type": "string", + "additionalProperties": false + }, + "Inventory.HazmatResponse": { + "type": "object", + "additionalProperties": false, + "properties": { + "is_hazmat": { + "type": "boolean", + "additionalProperties": false + }, + "validated": { + "type": "boolean", + "additionalProperties": false + } + } + }, + "Inventory.InventoryQuantityFcResponse": { + "type": "object", + "additionalProperties": false, + "properties": { + "inventory_id": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "locations": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.FulfillmentCenterResponse" + }, + "nullable": true + }, + "name": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "sku": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Inventory.InventoryQuantityFcResponsePagedResponse": { + "type": "object", + "additionalProperties": false, + "properties": { + "first": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "items": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.InventoryQuantityFcResponse" + }, + "nullable": true + }, + "last": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "next": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "prev": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Inventory.InventoryQuantityLotResponse": { + "type": "object", + "additionalProperties": false, + "properties": { + "inventory_id": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "lots": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.Lots" + }, + "nullable": true + }, + "name": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "sku": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Inventory.InventoryQuantityLotResponsePagedResponse": { + "type": "object", + "additionalProperties": false, + "properties": { + "first": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "items": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.InventoryQuantityLotResponse" + }, + "nullable": true + }, + "last": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "next": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "prev": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Inventory.InventoryQuantityResponse": { + "type": "object", + "additionalProperties": false, + "properties": { + "inventory_id": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "name": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "sku": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "total_awaiting_quantity": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "total_backordered_quantity": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "total_committed_quantity": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "total_exception_quantity": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "total_fulfillable_quantity": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "total_internal_transfer_quantity": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "total_on_hand_quantity": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "total_sellable_quantity": { + "type": "integer", + "format": "int32", + "additionalProperties": false + } + } + }, + "Inventory.InventoryQuantityResponsePagedResponse": { + "type": "object", + "additionalProperties": false, + "properties": { + "first": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "items": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.InventoryQuantityResponse" + }, + "nullable": true + }, + "last": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "next": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "prev": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Inventory.InventoryResponse": { + "type": "object", + "additionalProperties": false, + "properties": { + "barcode": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "dimensions": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.DimensionsResponse" + }, + "inventory_id": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "is_case": { + "type": "boolean", + "additionalProperties": false + }, + "is_lot": { + "type": "boolean", + "additionalProperties": false + }, + "name": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "sku": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "user_id": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "variant": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.VariantResponse" + }, + "weight": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.WeightResponse" + } + } + }, + "Inventory.InventoryResponsePagedResponse": { + "type": "object", + "additionalProperties": false, + "properties": { + "first": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "items": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.InventoryResponse" + }, + "nullable": true + }, + "last": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "next": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "prev": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Inventory.Lots": { + "type": "object", + "additionalProperties": false, + "properties": { + "awaiting_quantity": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "committed_quantity": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "fulfillable_quantity": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "internal_transfer_quantity": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "locations": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.FulfillableQuantityByFulfillmentCenter" + }, + "nullable": true + }, + "lot_date": { + "type": "string", + "format": "date-time", + "additionalProperties": false, + "nullable": true + }, + "lot_number": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "on_hand_quantity": { + "type": "integer", + "format": "int32", + "additionalProperties": false + } + } + }, + "Inventory.ProblemDetails": { + "type": "object", + "additionalProperties": { + "additionalProperties": false + }, + "properties": { + "detail": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "instance": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "status": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "title": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "type": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Inventory.VariantResponse": { + "type": "object", + "additionalProperties": false, + "properties": { + "hazmat": { + "additionalProperties": false, + "$ref": "#/components/schemas/Inventory.HazmatResponse" + }, + "is_active": { + "type": "boolean", + "additionalProperties": false + }, + "is_bundle": { + "type": "boolean", + "additionalProperties": false + }, + "is_digital": { + "type": "boolean", + "additionalProperties": false + } + } + }, + "Inventory.WeightResponse": { + "type": "object", + "additionalProperties": false, + "properties": { + "unit": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "value": { + "type": "number", + "format": "double", + "additionalProperties": false + } + } + }, + "Locations.AddressViewModel": { + "type": "object", + "description": "The service-specific address of the location. Each object contains address type, address1, address2, city, state, country, zip code, phone number, and email", + "additionalProperties": false, + "properties": { + "address1": { + "type": "string", + "description": "First part of the address of the location for this service", + "additionalProperties": false, + "nullable": true + }, + "address2": { + "type": "string", + "description": "Second part of the address of the location for this service", + "additionalProperties": false, + "nullable": true + }, + "city": { + "type": "string", + "description": "City of the location", + "additionalProperties": false, + "nullable": true + }, + "country": { + "type": "string", + "description": "Country of the location", + "additionalProperties": false, + "nullable": true + }, + "email": { + "type": "string", + "description": "Email of the location for this service", + "additionalProperties": false, + "nullable": true + }, + "name": { + "type": "string", + "description": "Name to use in the address of the location for this service", + "additionalProperties": false, + "nullable": true + }, + "phone_number": { + "type": "string", + "description": "Phone Number of the location for this service", + "additionalProperties": false, + "nullable": true + }, + "state": { + "type": "string", + "description": "State of the location", + "additionalProperties": false, + "nullable": true + }, + "zip_code": { + "type": "string", + "description": "Zip code of the location", + "additionalProperties": false, + "nullable": true + } + } + }, + "Locations.FcAttributeViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "integer", + "description": "Unique Id for the fulfillment center attribute", + "format": "int32", + "additionalProperties": false + }, + "name": { + "type": "string", + "description": "Name of the attribute.", + "additionalProperties": false, + "nullable": true + } + } + }, + "Locations.FcTypeViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "integer", + "description": "Unique Id for the fulfillment center type", + "format": "int32", + "additionalProperties": false + }, + "name": { + "type": "string", + "description": "Name of the fc type", + "additionalProperties": false, + "nullable": true + } + } + }, + "Locations.FcTypeViewModelV2": { + "type": "object", + "additionalProperties": false, + "properties": { + "organization_roles": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Locations.OrganizationRoleViewModel" + }, + "nullable": true + }, + "organization_type_id": { + "type": "string", + "format": "uuid", + "additionalProperties": false + }, + "organization_type_name": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + }, + "allOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Locations.FcTypeViewModel" + } + ] + }, + "Locations.FulfillmentCenterNameViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "integer", + "description": "Unique Id for the fulfillment center", + "format": "int32", + "additionalProperties": false + }, + "name": { + "type": "string", + "description": "Name for the fulfillment center", + "additionalProperties": false, + "nullable": true + } + } + }, + "Locations.FulfillmentCenterRegionViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "integer", + "description": "Unique Id for the location region", + "format": "int32", + "additionalProperties": false + }, + "name": { + "type": "string", + "description": "Name of the region the location is in.", + "additionalProperties": false, + "nullable": true + } + } + }, + "Locations.Get.1.0.Location.AccessGranted.Boolean": { + "type": "boolean", + "description": "Return all the access granted locations", + "additionalProperties": false, + "nullable": true + }, + "Locations.Get.1.0.Location.IncludeInactive.Boolean": { + "type": "boolean", + "description": "Whether the inactive locations should be included or not", + "additionalProperties": false, + "nullable": true + }, + "Locations.Get.1.0.Location.OK.OneOfArray": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Locations.LocationViewModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Locations.InternalLocationViewModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Locations.InternalLocationViewModelV2" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Locations.LocationViewModelV2" + } + ] + } + }, + "Locations.Get.1.0.Location.ReceivingEnabled.Boolean": { + "type": "boolean", + "description": "Return all the receiving enabled locations", + "additionalProperties": false, + "nullable": true + }, + "Locations.Get.1.0.Location.UserId.Integer": { + "type": "integer", + "description": "Return all locations the user has access to", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "Locations.InternalLocationViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "fulfillment_center_attributes": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Locations.FcAttributeViewModel" + }, + "nullable": true + }, + "fulfillment_center_type": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Locations.FcTypeViewModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Locations.FcTypeViewModelV2" + } + ], + "nullable": true + }, + "is_enabled_for_new_user": { + "type": "boolean", + "additionalProperties": false + }, + "is_external": { + "type": "boolean", + "additionalProperties": false + } + }, + "allOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Locations.LocationViewModel" + } + ] + }, + "Locations.InternalLocationViewModelV2": { + "type": "object", + "additionalProperties": false, + "properties": { + "fulfillment_center_attributes": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Locations.FcAttributeViewModel" + }, + "nullable": true + }, + "fulfillment_center_type": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Locations.FcTypeViewModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Locations.FcTypeViewModelV2" + } + ], + "nullable": true + }, + "is_enabled_for_new_user": { + "type": "boolean", + "additionalProperties": false + }, + "max_sku_allowed": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "receiving_hub": { + "additionalProperties": false, + "$ref": "#/components/schemas/Locations.FulfillmentCenterNameViewModel" + }, + "sort_center": { + "additionalProperties": false, + "$ref": "#/components/schemas/Locations.FulfillmentCenterNameViewModel" + } + }, + "allOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Locations.LocationViewModelV2" + } + ] + }, + "Locations.LocationViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "abbreviation": { + "type": "string", + "description": "Abbreviation of the location. Combination of nearest Airport Code and the sequence number.", + "additionalProperties": false, + "nullable": true + }, + "access_granted": { + "type": "boolean", + "description": "Indicates whether or not the user is authorized to interact at all with the location", + "additionalProperties": false + }, + "attributes": { + "type": "array", + "description": "Available attributes for the location", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + }, + "nullable": true + }, + "id": { + "type": "integer", + "description": "Id of the location in ShipBob’s database", + "format": "int32", + "additionalProperties": false + }, + "is_active": { + "type": "boolean", + "description": "Indicates if the location is operationally active or inactive", + "additionalProperties": false + }, + "is_receiving_enabled": { + "type": "boolean", + "description": "Indicates if the receiving is enabled for FC", + "additionalProperties": false + }, + "is_shipping_enabled": { + "type": "boolean", + "description": "Indicates if the shipping is enabled for FC", + "additionalProperties": false + }, + "name": { + "type": "string", + "description": "Name of the location. Follows the naming convention City (State Code)\r\nfor domestic FCs and City (Country Code) for international FCs", + "additionalProperties": false, + "nullable": true + }, + "region": { + "additionalProperties": false, + "$ref": "#/components/schemas/Locations.FulfillmentCenterRegionViewModel" + }, + "services": { + "type": "array", + "description": "Services provided by the location", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Locations.ServiceViewModel" + }, + "nullable": true + }, + "timezone": { + "type": "string", + "description": "Time zone of the location", + "additionalProperties": false, + "nullable": true + } + } + }, + "Locations.LocationViewModelV2": { + "type": "object", + "additionalProperties": false, + "properties": { + "organization_id": { + "type": "string", + "format": "uuid", + "additionalProperties": false + }, + "owner_id": { + "type": "string", + "format": "uuid", + "additionalProperties": false, + "nullable": true + }, + "parent_id": { + "type": "string", + "format": "uuid", + "additionalProperties": false, + "nullable": true + } + }, + "allOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Locations.LocationViewModel" + } + ] + }, + "Locations.OrganizationRoleViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "description": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "string", + "format": "uuid", + "additionalProperties": false + }, + "name": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Locations.ServiceTypeEnum": { + "type": "string", + "additionalProperties": false, + "enum": [ + "Receiving", + "Returns" + ] + }, + "Locations.ServiceViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "address": { + "additionalProperties": false, + "$ref": "#/components/schemas/Locations.AddressViewModel" + }, + "enabled": { + "type": "boolean", + "description": "Indicates if the user is authorized to access this service at the location", + "additionalProperties": false + }, + "service_type": { + "additionalProperties": false, + "$ref": "#/components/schemas/Locations.ServiceTypeEnum" + } + } + }, + "Orders.AddProductToOrderByProductIdModel": { + "type": "object", + "additionalProperties": false, + "required": [ + "productId", + "quantity" + ], + "properties": { + "external_line_id": { + "type": "integer", + "description": "Numeric assignment per item. Used as a reference number for multiple purposes such as split orders, split containers, etc.", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "integer", + "description": "Unique id of the product", + "format": "int32", + "additionalProperties": false + }, + "quantity": { + "type": "integer", + "description": "The quantity of this product ordered", + "format": "int32", + "additionalProperties": false + }, + "quantity_unit_of_measure_code": { + "type": "string", + "description": "Defined standard for measure for an item (each, inner pack, case, pallet). Values: EA, INP, CS and PL", + "additionalProperties": false, + "nullable": true + } + }, + "allOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.AddProductToOrderModel" + } + ] + }, + "Orders.AddProductToOrderByReferenceIdModel": { + "type": "object", + "additionalProperties": false, + "required": [ + "quantity", + "referenceId" + ], + "properties": { + "external_line_id": { + "type": "integer", + "description": "Numeric assignment per item. Used as a reference number for multiple purposes such as split orders, split containers, etc.", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "gtin": { + "type": "string", + "description": "Global Trade Item Number - unique and internationally recognized identifier assigned to item by company GS1", + "maxLength": 50, + "minLength": 0, + "additionalProperties": false, + "nullable": true + }, + "name": { + "type": "string", + "description": "Name of the product. Required if there is not an existing ShipBob product with a matching reference_id value.", + "example": "TShirtBlueM", + "additionalProperties": false, + "nullable": true + }, + "quantity": { + "type": "integer", + "description": "The quantity of this product ordered", + "format": "int32", + "additionalProperties": false + }, + "quantity_unit_of_measure_code": { + "type": "string", + "description": "Defined standard for measure for an item (each, inner pack, case, pallet). Values: EA, INP, CS and PL", + "additionalProperties": false, + "nullable": true + }, + "reference_id": { + "type": "string", + "description": "Unique reference id of the product", + "minLength": 1, + "example": "TShirtBlueM", + "additionalProperties": false + }, + "sku": { + "type": "string", + "description": "Product SKU", + "additionalProperties": false, + "nullable": true + }, + "unit_price": { + "type": "number", + "description": "Price for one item", + "format": "double", + "additionalProperties": false, + "nullable": true + }, + "upc": { + "type": "string", + "description": "Universal Product Code - Unique external identifier", + "maxLength": 50, + "minLength": 0, + "additionalProperties": false, + "nullable": true + } + }, + "allOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.AddProductToOrderModel" + } + ] + }, + "Orders.AddProductToOrderModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "external_line_id": { + "type": "integer", + "description": "Numeric assignment per item. Used as a reference number for multiple purposes such as split orders, split containers, etc.", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "quantity": { + "type": "integer", + "format": "int32", + "maximum": 2147483647.0, + "minimum": 1.0, + "additionalProperties": false + }, + "quantity_unit_of_measure_code": { + "type": "string", + "description": "Defined standard for measure for an item (each, inner pack, case, pallet). Values: EA, INP, CS and PL", + "additionalProperties": false, + "nullable": true + } + } + }, + "Orders.AddStoreOrderJsonModel": { + "type": "object", + "description": "Model for adding a Store Order Json to a ShipBob Order.", + "example": { + "order_json": "string" + }, + "additionalProperties": false, + "required": [ + "orderJson" + ], + "properties": { + "order_json": { + "type": "string", + "description": "Json String that represent the order on a store front system", + "minLength": 1, + "additionalProperties": false + } + } + }, + "Orders.AddressType": { + "type": "string", + "additionalProperties": false, + "enum": [ + "MarkFor", + "ShipFrom" + ] + }, + "Orders.AddressViewModel": { + "type": "object", + "additionalProperties": false, + "required": [ + "address1", + "city", + "country" + ], + "properties": { + "address1": { + "type": "string", + "description": "First line of the address", + "minLength": 1, + "example": "100 Nowhere Blvd", + "additionalProperties": false + }, + "address2": { + "type": "string", + "description": "Second line of the address", + "example": "Suite 100", + "additionalProperties": false, + "nullable": true + }, + "city": { + "type": "string", + "description": "The city", + "minLength": 1, + "example": "Gotham City", + "additionalProperties": false + }, + "company_name": { + "type": "string", + "description": "Name of the company receiving the shipment", + "example": "Wayne Enterprises", + "additionalProperties": false, + "nullable": true + }, + "country": { + "type": "string", + "description": "The country (Must be ISO Alpha-2 for estimates)", + "minLength": 1, + "example": "US", + "additionalProperties": false + }, + "state": { + "type": "string", + "description": "The state or province", + "example": "NJ", + "additionalProperties": false, + "nullable": true + }, + "zip_code": { + "type": "string", + "description": "The zip code or postal code", + "format": "postal-code", + "example": "07093", + "additionalProperties": false, + "nullable": true + } + } + }, + "Orders.BulkUpdateResponseError": { + "type": "object", + "additionalProperties": false, + "properties": { + "code": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "message": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Orders.BulkUpdateResponseModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "results": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.BulkUpdateResponseResult" + }, + "nullable": true + }, + "summary": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.BulkUpdateResponseSummary" + } + } + }, + "Orders.BulkUpdateResponseResult": { + "type": "object", + "additionalProperties": false, + "properties": { + "error": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.BulkUpdateResponseError" + }, + "isSuccess": { + "type": "boolean", + "additionalProperties": false + }, + "shipmentId": { + "type": "integer", + "format": "int64", + "additionalProperties": false + } + } + }, + "Orders.BulkUpdateResponseSummary": { + "type": "object", + "additionalProperties": false, + "properties": { + "failed": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "successful": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "total": { + "type": "integer", + "format": "int32", + "additionalProperties": false + } + } + }, + "Orders.BulkUpdateTrackingUploadModel": { + "type": "object", + "description": "Model for updating tracking upload status for multiple shipments", + "example": { + "is_tracking_uploaded": true, + "shipment_ids": [ + 100810005 + ] + }, + "additionalProperties": false, + "properties": { + "is_tracking_uploaded": { + "type": "boolean", + "description": "Indicates whether the Shipment was marked with tracking information\r\nuploaded to a third-party system where the order originated.\r\nApplies to all shipments in shipment_ids", + "additionalProperties": false + }, + "shipment_ids": { + "type": "array", + "description": "Shipment IDs to apply the tracking upload status to", + "additionalProperties": false, + "items": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "nullable": true + } + } + }, + "Orders.CancelShipmentsModel": { + "type": "object", + "description": "Model for cancel multiple shipments at once", + "example": { + "shipment_ids": [ + 0 + ] + }, + "additionalProperties": false, + "properties": { + "shipment_ids": { + "type": "array", + "description": "Shipment IDs to cancel", + "additionalProperties": false, + "items": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "nullable": true + } + } + }, + "Orders.CanceledOrderViewModel": { + "type": "object", + "description": "", + "additionalProperties": false, + "properties": { + "canceled_shipment_results": { + "type": "array", + "description": "Results of canceling the shipments associated with the order", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.CanceledShipmentViewModel" + }, + "nullable": true + }, + "order": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.OrderViewModel" + }, + "order_id": { + "type": "integer", + "description": "The ID of the canceled order", + "format": "int32", + "additionalProperties": false + }, + "status": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.CancellationResult" + } + } + }, + "Orders.CanceledShipmentViewModel": { + "type": "object", + "description": "", + "additionalProperties": false, + "properties": { + "action": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.ShipmentAction" + }, + "is_success": { + "type": "boolean", + "description": "If the cancel action was successful", + "additionalProperties": false + }, + "reason": { + "type": "string", + "description": "The reason the cancellation result", + "additionalProperties": false, + "nullable": true + }, + "shipment_id": { + "type": "integer", + "description": "The ID of the shipment", + "format": "int64", + "additionalProperties": false + } + } + }, + "Orders.CanceledShipmentsViewModel": { + "type": "object", + "description": "", + "additionalProperties": false, + "properties": { + "results": { + "type": "array", + "description": "The results of all cancellation actions", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.CanceledShipmentViewModel" + }, + "nullable": true + } + } + }, + "Orders.CancellationResult": { + "type": "string", + "additionalProperties": false, + "enum": [ + "Success", + "Failure", + "PartialSuccess" + ] + }, + "Orders.CarrierShipType": { + "type": "string", + "additionalProperties": false, + "enum": [ + "Parcel", + "Freight" + ] + }, + "Orders.CartonDetailsViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "products": { + "type": "array", + "description": "List of what is packed in this carton", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.ShipmentProductViewModel" + }, + "nullable": true + } + } + }, + "Orders.CartonMeasurementsViewModel": { + "type": "object", + "description": "Measurements of a carton", + "additionalProperties": false, + "properties": { + "depth_in": { + "type": "number", + "description": "Total depth in inches", + "format": "double", + "additionalProperties": false + }, + "length_in": { + "type": "number", + "description": "Total length in inches", + "format": "double", + "additionalProperties": false + }, + "total_weight_oz": { + "type": "number", + "description": "Total weight in ounces", + "format": "double", + "additionalProperties": false + }, + "width_in": { + "type": "number", + "description": "Total width in inches", + "format": "double", + "additionalProperties": false + } + } + }, + "Orders.CartonViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "barcode": { + "type": "string", + "description": "Barcode assigned to this carton", + "additionalProperties": false, + "nullable": true + }, + "carton_details": { + "type": "array", + "description": "Details about the contents of this carton", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.CartonDetailsViewModel" + }, + "nullable": true + }, + "id": { + "type": "integer", + "description": "ID assigned to this carton", + "format": "int32", + "additionalProperties": false + }, + "measurements": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.CartonMeasurementsViewModel" + }, + "type": { + "type": "string", + "description": "Type of this carton container", + "example": "Box or pallet", + "additionalProperties": false, + "nullable": true + } + } + }, + "Orders.ChannelInfoViewModel": { + "type": "object", + "description": "Created by channel metadata", + "additionalProperties": false, + "properties": { + "id": { + "type": "integer", + "description": "Unique id of the channel", + "format": "int32", + "additionalProperties": false + }, + "name": { + "type": "string", + "description": "Name of the channel", + "example": "ShipBobs-Shopify-Store", + "additionalProperties": false, + "nullable": true + } + } + }, + "Orders.CreateOrderModel": { + "type": "object", + "example": { + "financials": { + "total_price": 0.1 + }, + "gift_message": "string", + "location_id": 0, + "order_number": "string", + "products": [ + { + "external_line_id": 0, + "id": 0, + "quantity": 1, + "quantity_unit_of_measure_code": "string" + } + ], + "purchase_date": "2019-08-24T14:15:22Z", + "recipient": { + "address": { + "address1": "100 Nowhere Blvd", + "address2": "Suite 100", + "city": "Gotham City", + "company_name": "Wayne Enterprises", + "country": "US", + "state": "NJ", + "zip_code": "07093" + }, + "email": "john@example.com", + "name": "John Doe", + "phone_number": "555-555-5555" + }, + "reference_id": "string", + "retailer_program_data": { + "addresses": [ + { + "address1": "100 Nowhere Blvd", + "address2": "Suite 100", + "city": "Gotham City", + "company_name": "Wayne Enterprises", + "country": "US", + "state": "NJ", + "type": "MarkFor", + "zip_code": "07093" + } + ], + "customer_ticket_number": "string", + "delivery_date": "2019-08-24T14:15:22Z", + "department": "string", + "doNotShipBeforeDate": "2019-08-24T14:15:22Z", + "mark_for_store": "string", + "purchase_order_number": "string", + "retailer_program_type": "string", + "shipByDate": "2019-08-24T14:15:22Z" + }, + "shipping_method": "Free 2-day Shipping", + "shipping_terms": { + "carrier_type": "Parcel", + "payment_term": "Collect" + }, + "tags": [ + { + "name": "Handling instructions", + "value": "Fragile" + } + ], + "type": "DTC" + }, + "additionalProperties": false, + "required": [ + "products", + "recipient", + "referenceId", + "shippingMethod" + ], + "properties": { + "financials": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Financials" + }, + "gift_message": { + "type": "string", + "description": "Gift message associated with the order", + "maxLength": 500, + "additionalProperties": false, + "nullable": true + }, + "location_id": { + "type": "integer", + "description": "Desired Fulfillment Center Location ID. If not specified, ShipBob will determine the location that fulfills this order.", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "order_number": { + "type": "string", + "description": "User friendly orderId or store order number that will be shown on the Orders Page. If not provided, referenceId will be used", + "maxLength": 400, + "additionalProperties": false, + "nullable": true + }, + "origin_platform_program": { + "type": "string", + "description": "Origin platform program for the order. Accepts a program name.", + "maxLength": 100, + "example": "FBM", + "additionalProperties": false, + "nullable": true + }, + "products": { + "type": "array", + "description": "Products included in the order. Products identified by reference_id must also include the product name if there is no matching ShipBob product.", + "minItems": 1, + "additionalProperties": false, + "items": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.AddProductToOrderByProductIdModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.AddProductToOrderByReferenceIdModel" + } + ] + } + }, + "purchase_date": { + "type": "string", + "description": "Date this order was purchase by the end user", + "format": "date-time", + "additionalProperties": false, + "nullable": true + }, + "recipient": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.RecipientInfoViewModel" + }, + "reference_id": { + "type": "string", + "description": "Unique and immutable order identifier from your upstream system", + "maxLength": 300, + "minLength": 1, + "additionalProperties": false + }, + "retailer_program_data": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.RetailerProgramDataViewModel" + }, + "sales_channel": { + "type": "string", + "description": "Origin platform source for the order. Accepts a sales channel name that is case insensitive and the list of acceptable values can be found at https://support.shipbob.com/s/article/ShipBob-Developer-API", + "maxLength": 100, + "example": "Amazon", + "additionalProperties": false, + "nullable": true + }, + "shipping_method": { + "type": "string", + "description": "Client-defined shipping method matching what the user has listed as the shipping method on the Ship Option Mapping setup page in the ShipBob Merchant Portal. If they don’t match, we will create a new one and default it to Standard", + "minLength": 1, + "example": "Free 2-day Shipping", + "additionalProperties": false + }, + "shipping_terms": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.ShippingTermsViewModel" + }, + "tags": { + "type": "array", + "description": "Key value pair array to store extra information at the order level for API purposes. ShipBob won't display the info in the ShipBob Merchant Portal or react based on this data.", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.TagViewModel" + }, + "nullable": true + }, + "type": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.OrderType" + } + } + }, + "Orders.EstimateDetailViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "estimated_currency_code": { + "type": "string", + "description": "Estimated local currency code", + "additionalProperties": false, + "nullable": true + }, + "estimated_price": { + "type": "number", + "description": "Estimated price in dollars for the provided shipping method", + "format": "double", + "additionalProperties": false + }, + "fulfillment_center": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.FulfillmentCenterViewModel" + }, + "shipping_method": { + "type": "string", + "description": "Provided shipping method. Maps to ship option in ShipBob.", + "additionalProperties": false, + "nullable": true + }, + "total_weight_oz": { + "type": "number", + "description": "Total weight of items in cart including packaging.", + "format": "double", + "additionalProperties": false + } + } + }, + "Orders.EstimateFulfillmentRequestModel": { + "type": "object", + "example": { + "address": { + "address1": "100 Nowhere Blvd", + "address2": "Suite 100", + "city": "Gotham City", + "company_name": "Wayne Enterprises", + "country": "US", + "state": "NJ", + "zip_code": "07093" + }, + "products": [ + { + "id": 0, + "quantity": 1, + "reference_id": "TShirtBlueM" + } + ], + "shipping_methods": [ + "string" + ] + }, + "additionalProperties": false, + "required": [ + "address", + "products" + ], + "properties": { + "address": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.EstimationAddressViewModel" + }, + "products": { + "type": "array", + "description": "Products to be included in the order. Each product must include one of reference_id or id", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.EstimateProductInfoModel" + } + }, + "shipping_methods": { + "type": "array", + "description": "Array of strings specifying shipping methods for which to fetch estimates.\r\n\r\nIf this field is omitted we will return estimates for all shipping methods defined in ShipBob", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + }, + "nullable": true + } + } + }, + "Orders.EstimateProductInfoModel": { + "type": "object", + "additionalProperties": false, + "required": [ + "quantity" + ], + "properties": { + "id": { + "type": "integer", + "description": "Unique id of the product (Must be provided if reference_id is unknown)", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "quantity": { + "type": "integer", + "description": "The quantity of this product ordered", + "format": "int32", + "maximum": 199.0, + "minimum": 1.0, + "additionalProperties": false + }, + "reference_id": { + "type": "string", + "description": "Unique reference id of the product (Must be provided if ID is unknown)", + "example": "TShirtBlueM", + "additionalProperties": false, + "nullable": true + } + } + }, + "Orders.EstimateViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "estimates": { + "type": "array", + "description": "Array of estimates for each shipping method", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.EstimateDetailViewModel" + }, + "nullable": true + } + } + }, + "Orders.EstimationAddressViewModel": { + "type": "object", + "additionalProperties": false, + "required": [ + "country" + ], + "properties": { + "address1": { + "type": "string", + "description": "First line of the address", + "example": "100 Nowhere Blvd", + "additionalProperties": false, + "nullable": true + }, + "address2": { + "type": "string", + "description": "Second line of the address", + "example": "Suite 100", + "additionalProperties": false, + "nullable": true + }, + "city": { + "type": "string", + "description": "The city", + "example": "Gotham City", + "additionalProperties": false, + "nullable": true + }, + "company_name": { + "type": "string", + "description": "Name of the company receiving the shipment", + "example": "Wayne Enterprises", + "additionalProperties": false, + "nullable": true + }, + "country": { + "type": "string", + "description": "The country (Must be ISO Alpha-2 for estimates)", + "minLength": 1, + "example": "US", + "additionalProperties": false + }, + "state": { + "type": "string", + "description": "The state or province", + "example": "NJ", + "additionalProperties": false, + "nullable": true + }, + "zip_code": { + "type": "string", + "description": "The zip code or postal code", + "format": "postal-code", + "example": "07093", + "additionalProperties": false, + "nullable": true + } + } + }, + "Orders.Financials": { + "type": "object", + "additionalProperties": false, + "properties": { + "total_price": { + "type": "number", + "description": "Sum of all line item prices, discounts, and taxes in USD", + "format": "double", + "additionalProperties": false, + "nullable": true + } + } + }, + "Orders.FulfillmentCenterViewModel": { + "type": "object", + "description": "Information about a fulfillment center that a shipment can belong to", + "additionalProperties": false, + "properties": { + "id": { + "type": "integer", + "description": "Id of the fulfillment center", + "format": "int32", + "additionalProperties": false + }, + "name": { + "type": "string", + "description": "Name of the fulfillment center", + "example": "Cicero (IL)", + "additionalProperties": false, + "nullable": true + } + } + }, + "Orders.FulfillmentStatus": { + "type": "string", + "additionalProperties": false, + "enum": [ + "AwaitingInventoryAllocation", + "AwaitingReset", + "Unavailable", + "PendingOnTime", + "FulfilledOnTime", + "PendingLate", + "FulfilledLate" + ] + }, + "Orders.Get.Api.Order.Bad.Request.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Orders.Get.Api.Order.Cancelled.Bad.Request.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Orders.Get.Api.Order.Cancelled.IsTrackingUploaded.Boolean": { + "type": "boolean", + "additionalProperties": false + }, + "Orders.Get.Api.Order.Cancelled.Limit.Integer": { + "type": "integer", + "format": "int32", + "maximum": 250.0, + "minimum": 1.0, + "additionalProperties": false + }, + "Orders.Get.Api.Order.Cancelled.Page.Integer": { + "type": "integer", + "format": "int32", + "maximum": 2147483647.0, + "minimum": 1.0, + "additionalProperties": false + }, + "Orders.Get.Api.Order.EndDate.String": { + "type": "string", + "format": "date-time", + "additionalProperties": false + }, + "Orders.Get.Api.Order.HasTracking.Boolean": { + "type": "boolean", + "additionalProperties": false + }, + "Orders.Get.Api.Order.IDs.IntegerArray": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "integer", + "format": "int32", + "additionalProperties": false + } + }, + "Orders.Get.Api.Order.IsTrackingUploaded.Boolean": { + "type": "boolean", + "additionalProperties": false + }, + "Orders.Get.Api.Order.LastTrackingUpdateEndDate.String": { + "type": "string", + "format": "date-time", + "additionalProperties": false + }, + "Orders.Get.Api.Order.LastTrackingUpdateStartDate.String": { + "type": "string", + "format": "date-time", + "additionalProperties": false + }, + "Orders.Get.Api.Order.LastUpdateEndDate.String": { + "type": "string", + "format": "date-time", + "additionalProperties": false + }, + "Orders.Get.Api.Order.LastUpdateStartDate.String": { + "type": "string", + "format": "date-time", + "additionalProperties": false + }, + "Orders.Get.Api.Order.Limit.Integer": { + "type": "integer", + "format": "int32", + "maximum": 250.0, + "minimum": 1.0, + "additionalProperties": false + }, + "Orders.Get.Api.Order.OrderId.Bad.Request.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Orders.Get.Api.Order.OrderId.OrderId.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Orders.Get.Api.Order.OrderId.Shipbob.Channel.Id.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Orders.Get.Api.Order.OrderId.Shipment.Bad.Request.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Orders.Get.Api.Order.OrderId.Shipment.OK.OneOfArray": { + "type": "array", + "additionalProperties": false, + "items": { + "description": "Information about a shipment", + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.ShipmentViewModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.InternalShipmentViewModel" + } + ] + } + }, + "Orders.Get.Api.Order.OrderId.Shipment.OrderId.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Orders.Get.Api.Order.OrderId.Shipment.Shipbob.Channel.Id.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Orders.Get.Api.Order.OrderId.Shipment.ShipmentId.Bad.Request.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Orders.Get.Api.Order.OrderId.Shipment.ShipmentId.Logs.Bad.Request.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Orders.Get.Api.Order.OrderId.Shipment.ShipmentId.Logs.OrderId.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Orders.Get.Api.Order.OrderId.Shipment.ShipmentId.Logs.Shipbob.Channel.Id.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Orders.Get.Api.Order.OrderId.Shipment.ShipmentId.Logs.ShipmentId.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Orders.Get.Api.Order.OrderId.Shipment.ShipmentId.OK.OneOf.ShipmentViewModel.InternalShipmentViewModel": { + "description": "Information about a shipment", + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.ShipmentViewModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.InternalShipmentViewModel" + } + ] + }, + "Orders.Get.Api.Order.OrderId.Shipment.ShipmentId.OrderId.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Orders.Get.Api.Order.OrderId.Shipment.ShipmentId.Shipbob.Channel.Id.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Orders.Get.Api.Order.OrderId.Shipment.ShipmentId.ShipmentId.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Orders.Get.Api.Order.OrderId.Shipment.ShipmentId.Timeline.Bad.Request.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Orders.Get.Api.Order.OrderId.Shipment.ShipmentId.Timeline.OrderId.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Orders.Get.Api.Order.OrderId.Shipment.ShipmentId.Timeline.Shipbob.Channel.Id.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Orders.Get.Api.Order.OrderId.Shipment.ShipmentId.Timeline.ShipmentId.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Orders.Get.Api.Order.OrderId.StoreOrderJson.Bad.Request.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Orders.Get.Api.Order.OrderId.StoreOrderJson.OK.String": { + "type": "string", + "additionalProperties": false + }, + "Orders.Get.Api.Order.OrderId.StoreOrderJson.OrderId.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Orders.Get.Api.Order.OrderId.StoreOrderJson.Unprocessable.Entity.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Orders.Get.Api.Order.Page.Integer": { + "type": "integer", + "format": "int32", + "maximum": 2147483647.0, + "minimum": 1.0, + "additionalProperties": false + }, + "Orders.Get.Api.Order.ReferenceIds.StringArray": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + }, + "Orders.Get.Api.Order.Shipbob.Channel.Id.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Orders.Get.Api.Order.StartDate.String": { + "type": "string", + "format": "date-time", + "additionalProperties": false + }, + "Orders.Get.Api.Shipment.ListByStatus.AsOfStatusDate.String": { + "type": "string", + "format": "date-time", + "additionalProperties": false + }, + "Orders.Get.Api.Shipment.ListByStatus.Limit.Integer": { + "type": "integer", + "format": "int32", + "maximum": 2147483647.0, + "minimum": 1.0, + "additionalProperties": false + }, + "Orders.Get.Api.Shipment.ListByStatus.Page.Integer": { + "type": "integer", + "format": "int32", + "maximum": 2147483647.0, + "minimum": 1.0, + "additionalProperties": false + }, + "Orders.Get.Api.Shipment.ListByStatus.Shipbob.Channel.Id.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Orders.Get.Api.Shipment.PickedNotShippedInventory.FulfillmentCenterId.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Orders.Get.Api.Shipment.PickedNotShippedInventory.Shipbob.Channel.Id.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Orders.Get.Api.Shipment.ShipmentId.Bad.Request.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Orders.Get.Api.Shipment.ShipmentId.Logs.Bad.Request.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Orders.Get.Api.Shipment.ShipmentId.Logs.Shipbob.Channel.Id.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Orders.Get.Api.Shipment.ShipmentId.Logs.ShipmentId.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Orders.Get.Api.Shipment.ShipmentId.OK.OneOf.ShipmentViewModel.InternalShipmentViewModel": { + "description": "Information about a shipment", + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.ShipmentViewModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.InternalShipmentViewModel" + } + ] + }, + "Orders.Get.Api.Shipment.ShipmentId.Shipbob.Channel.Id.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Orders.Get.Api.Shipment.ShipmentId.ShipmentId.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Orders.Get.Api.Shipment.ShipmentId.Timeline.Bad.Request.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Orders.Get.Api.Shipment.ShipmentId.Timeline.Shipbob.Channel.Id.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Orders.Get.Api.Shipment.ShipmentId.Timeline.ShipmentId.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Orders.Get.Api.Shippingmethod.Bad.Request.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Orders.Get.Api.Shippingmethod.Limit.Integer": { + "type": "integer", + "format": "int32", + "maximum": 250.0, + "minimum": 1.0, + "additionalProperties": false + }, + "Orders.Get.Api.Shippingmethod.Page.Integer": { + "type": "integer", + "format": "int32", + "maximum": 2147483647.0, + "minimum": 0.0, + "additionalProperties": false + }, + "Orders.Get.Api.Shippingmethod.Unprocessable.Entity.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Orders.InternalShipmentViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "store_order_id": { + "type": "string", + "description": "Unique store order id of the shipment", + "additionalProperties": false, + "nullable": true + } + }, + "allOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.ShipmentViewModel" + } + ] + }, + "Orders.InventoryPickedNotShippedViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "expiration_date": { + "type": "string", + "description": "Expiration date of the inventory", + "format": "date-time", + "additionalProperties": false, + "nullable": true + }, + "fulfillment_center_id": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "inventory_id": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "lot_number": { + "type": "string", + "description": "Lot number of the inventory", + "example": "22222", + "additionalProperties": false, + "nullable": true + }, + "name": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "quantity": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "sku": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Orders.InventoryPickedNotShippedViewModelArray": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.InventoryPickedNotShippedViewModel" + } + }, + "Orders.InventoryViewModel": { + "type": "object", + "description": "Information about inventory belonging to a store product", + "additionalProperties": false, + "properties": { + "expiration_date": { + "type": "string", + "description": "Expiration date of the inventory", + "format": "date-time", + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "integer", + "description": "Unique id of the inventory", + "format": "int32", + "additionalProperties": false + }, + "is_dangerous_goods": { + "type": "boolean", + "description": "Is inventory Dangerous Good", + "example": true, + "additionalProperties": false + }, + "lot": { + "type": "string", + "description": "Lot number of the inventory", + "example": "22222", + "additionalProperties": false, + "nullable": true + }, + "name": { + "type": "string", + "description": "Name of the inventory item", + "example": "Medium Blue T-Shirt", + "additionalProperties": false, + "nullable": true + }, + "quantity": { + "type": "integer", + "description": "Quantity of the inventory item to be included in the fulfillment", + "format": "int32", + "additionalProperties": false + }, + "quantity_committed": { + "type": "integer", + "description": "The quantity of the inventory item allocated from the assigned fulfillment center and committed to the order. If quantity committed is less than order quantity, then the inventory item is out of stock at the assigned fulfillment center.", + "format": "int32", + "additionalProperties": false + }, + "serial_numbers": { + "type": "array", + "description": "Serial number of the inventory", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + }, + "nullable": true + } + } + }, + "Orders.MeasurementsViewModel": { + "type": "object", + "description": "Measurements of a shipment", + "additionalProperties": false, + "properties": { + "depth_in": { + "type": "integer", + "description": "Total depth in inches", + "format": "int32", + "additionalProperties": false + }, + "length_in": { + "type": "integer", + "description": "Total length in inches", + "format": "int32", + "additionalProperties": false + }, + "total_weight_oz": { + "type": "integer", + "description": "Total weight in ounces", + "format": "int32", + "additionalProperties": false + }, + "width_in": { + "type": "integer", + "description": "Total width in inches", + "format": "int32", + "additionalProperties": false + } + } + }, + "Orders.OrderShipmentIdsViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "integer", + "description": "Unique id of the order", + "format": "int64", + "additionalProperties": false + }, + "order_number": { + "type": "string", + "description": "User-friendly orderId or store order number that will be shown on the Orders Page. If not provided, referenceId\r\nwill be used", + "additionalProperties": false, + "nullable": true + }, + "shipment_ids": { + "type": "array", + "description": "Shipments Ids affiliated with the order", + "additionalProperties": false, + "items": { + "type": "integer", + "format": "int64", + "additionalProperties": false + }, + "nullable": true + } + } + }, + "Orders.OrderShipmentIdsViewModelArray": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.OrderShipmentIdsViewModel" + } + }, + "Orders.OrderStatus": { + "type": "string", + "additionalProperties": false, + "enum": [ + "Processing", + "Exception", + "PartiallyFulfilled", + "Fulfilled", + "Cancelled", + "ImportReview" + ] + }, + "Orders.OrderStatusEnum": { + "type": "string", + "additionalProperties": false, + "enum": [ + "None", + "Processing", + "Completed", + "Exception", + "OnHold", + "Cancelled", + "CleanSweeped", + "LabeledCreated", + "ImportReview" + ] + }, + "Orders.OrderType": { + "type": "string", + "additionalProperties": false, + "enum": [ + "DTC", + "DropShip", + "B2B" + ] + }, + "Orders.OrderVerifyAndSaveAddressRequest": { + "type": "object", + "description": "Request model for verify and save address for order", + "additionalProperties": false, + "required": [ + "city", + "streetAddress1" + ], + "properties": { + "CountryCode": { + "type": "string", + "description": "Country code of customer address", + "additionalProperties": false, + "nullable": true + }, + "IsDomestic": { + "type": "boolean", + "description": "IsDomestic flag", + "additionalProperties": false + }, + "IsPoBox": { + "type": "boolean", + "description": "IsPoBox flag", + "additionalProperties": false + }, + "IsValid": { + "type": "boolean", + "description": "IsValid flag", + "additionalProperties": false + }, + "OrderId": { + "type": "integer", + "description": "OrderId", + "format": "int32", + "additionalProperties": false + }, + "OverrideVerification": { + "type": "boolean", + "description": "Override Verification Flag", + "additionalProperties": false + }, + "PhoneNumber": { + "type": "string", + "description": "Phonenumber of customer address", + "additionalProperties": false, + "nullable": true + }, + "StreetAddress1": { + "type": "string", + "description": "Street Address 1", + "minLength": 1, + "additionalProperties": false + }, + "StreetAddress2": { + "type": "string", + "description": "Streed Address 2", + "additionalProperties": false, + "nullable": true + }, + "ZipCode": { + "type": "string", + "description": "Zipcode of customer address", + "additionalProperties": false, + "nullable": true + }, + "city": { + "type": "string", + "description": "City of customer address", + "minLength": 1, + "additionalProperties": false + }, + "email": { + "type": "string", + "description": "Customer's email address", + "additionalProperties": false, + "nullable": true + }, + "name": { + "type": "string", + "description": "Name of customer", + "additionalProperties": false, + "nullable": true + }, + "state": { + "type": "string", + "description": "State of customer address", + "additionalProperties": false, + "nullable": true + } + } + }, + "Orders.OrderViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "channel": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.ChannelInfoViewModel" + }, + "created_date": { + "type": "string", + "description": "Date this order was created", + "format": "date-time", + "additionalProperties": false + }, + "financials": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.Financials" + }, + "gift_message": { + "type": "string", + "description": "Gift message associated with the order", + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "integer", + "description": "Unique id of the order", + "format": "int32", + "additionalProperties": false + }, + "order_number": { + "type": "string", + "description": "User friendly orderId or store order number that will be shown on the Orders Page. If not provided, referenceId will be used", + "additionalProperties": false, + "nullable": true + }, + "products": { + "type": "array", + "description": "List of products included in the order", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.ProductInfoViewModel" + }, + "nullable": true + }, + "purchase_date": { + "type": "string", + "description": "Date this order was purchase by the end user", + "format": "date-time", + "additionalProperties": false, + "nullable": true + }, + "recipient": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.RecipientInfoViewModel" + }, + "reference_id": { + "type": "string", + "description": "Client-defined external unique id of the order", + "additionalProperties": false, + "nullable": true + }, + "retailer_program_data": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.RetailerProgramDataViewModel" + }, + "shipments": { + "type": "array", + "description": "Shipments affiliated with the order", + "additionalProperties": false, + "items": { + "description": "Information about a shipment", + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.ShipmentViewModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.InternalShipmentViewModel" + } + ] + }, + "nullable": true + }, + "shipping_method": { + "type": "string", + "description": "Client-defined shipping method", + "example": "Free 2-day Shipping", + "additionalProperties": false, + "nullable": true + }, + "shipping_terms": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.ShippingTermsViewModel" + }, + "status": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.OrderStatus" + }, + "tags": { + "type": "array", + "description": "Client-defined order tags", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.TagViewModel" + }, + "nullable": true + }, + "type": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.OrderType" + } + } + }, + "Orders.OrderViewModelArray": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.OrderViewModel" + } + }, + "Orders.PackageMaterialType": { + "type": "string", + "additionalProperties": false, + "enum": [ + "Unknown", + "Box", + "BubbleMailer", + "PolyMailer", + "FragileBox", + "PosterTube", + "Custom", + "Bookfold", + "OwnContainer", + "Undefined" + ] + }, + "Orders.ParentCartonViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "barcode": { + "type": "string", + "description": "Barcode assigned to this carton", + "additionalProperties": false, + "nullable": true + }, + "cartons": { + "type": "array", + "description": "Cartons packed inside this parent container", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.CartonViewModel" + }, + "nullable": true + }, + "measurements": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.CartonMeasurementsViewModel" + }, + "type": { + "type": "string", + "description": "Type of this carton container", + "example": "Box or pallet", + "additionalProperties": false, + "nullable": true + } + } + }, + "Orders.PaymentShipTerm": { + "type": "string", + "additionalProperties": false, + "enum": [ + "Collect", + "ThirdParty", + "Prepaid", + "MerchantResponsible" + ] + }, + "Orders.Post.Api.Order.Bad.Request.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Orders.Post.Api.Order.Estimate.Bad.Request.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Orders.Post.Api.Order.Estimate.Shipbob.Channel.Id.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Orders.Post.Api.Order.Estimate.Unprocessable.Entity.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Orders.Post.Api.Order.OrderId.Cancel.Bad.Request.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Orders.Post.Api.Order.OrderId.Cancel.Internal.Server.Error.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Orders.Post.Api.Order.OrderId.Cancel.OrderId.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Orders.Post.Api.Order.OrderId.Cancel.Shipbob.Channel.Id.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Orders.Post.Api.Order.OrderId.Cancel.Unprocessable.Entity.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Orders.Post.Api.Order.OrderId.Shipment.ShipmentId.Cancel.Bad.Request.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Orders.Post.Api.Order.OrderId.Shipment.ShipmentId.Cancel.Internal.Server.Error.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Orders.Post.Api.Order.OrderId.Shipment.ShipmentId.Cancel.OK.OneOf.ShipmentViewModel.InternalShipmentViewModel": { + "description": "Information about a shipment", + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.ShipmentViewModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.InternalShipmentViewModel" + } + ] + }, + "Orders.Post.Api.Order.OrderId.Shipment.ShipmentId.Cancel.OrderId.String": { + "type": "string", + "additionalProperties": false + }, + "Orders.Post.Api.Order.OrderId.Shipment.ShipmentId.Cancel.Shipbob.Channel.Id.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Orders.Post.Api.Order.OrderId.Shipment.ShipmentId.Cancel.ShipmentId.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Orders.Post.Api.Order.OrderId.Shipment.ShipmentId.Cancel.Unprocessable.Entity.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Orders.Post.Api.Order.OrderId.StoreOrderJson.Bad.Request.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Orders.Post.Api.Order.OrderId.StoreOrderJson.Created.String": { + "type": "string", + "additionalProperties": false + }, + "Orders.Post.Api.Order.OrderId.StoreOrderJson.OrderId.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Orders.Post.Api.Order.OrderId.StoreOrderJson.Unprocessable.Entity.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Orders.Post.Api.Order.Shipbob.Channel.Id.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Orders.Post.Api.Order.Unprocessable.Entity.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Orders.Post.Api.Shipment.BulkUpdateTrackingUpload.Bad.Request.String": { + "type": "string", + "additionalProperties": false + }, + "Orders.Post.Api.Shipment.Cancelbulk.Internal.Server.Error.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Orders.Post.Api.Shipment.Cancelbulk.Shipbob.Channel.Id.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Orders.Post.Api.Shipment.Cancelbulk.Unprocessable.Entity.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Orders.Post.Api.Shipment.ShipmentId.Cancel.Bad.Request.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Orders.Post.Api.Shipment.ShipmentId.Cancel.Internal.Server.Error.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Orders.Post.Api.Shipment.ShipmentId.Cancel.OK.OneOf.ShipmentViewModel.InternalShipmentViewModel": { + "description": "Information about a shipment", + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.ShipmentViewModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.InternalShipmentViewModel" + } + ] + }, + "Orders.Post.Api.Shipment.ShipmentId.Cancel.Shipbob.Channel.Id.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Orders.Post.Api.Shipment.ShipmentId.Cancel.ShipmentId.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Orders.Post.Api.Shipment.ShipmentId.Cancel.Unprocessable.Entity.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Orders.ProductInfoViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "external_line_id": { + "type": "integer", + "description": "Numeric assignment per item. Used as a reference number for multiple purposes such as split orders, split containers, etc.", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "gtin": { + "type": "string", + "description": "Global Trade Item Number - unique and internationally recognized identifier assigned to item by company GS1", + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "integer", + "description": "Unique id of the product", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "quantity": { + "type": "integer", + "description": "The quantity of this product ordered", + "format": "int32", + "additionalProperties": false + }, + "quantity_unit_of_measure_code": { + "type": "string", + "description": "Defined standard for measure for an item (each, inner pack, case, pallet). Values: EA, INP, CS and PL", + "additionalProperties": false, + "nullable": true + }, + "reference_id": { + "type": "string", + "description": "Unique reference id of the product", + "example": "TShirtBlueM", + "additionalProperties": false, + "nullable": true + }, + "sku": { + "type": "string", + "description": "Stock keeping unit for the product", + "example": "TShirtBlueM", + "additionalProperties": false, + "nullable": true + }, + "unit_price": { + "type": "number", + "description": "Price for one item", + "format": "double", + "additionalProperties": false, + "nullable": true + }, + "upc": { + "type": "string", + "description": "Universal Product Code - Unique external identifier", + "additionalProperties": false, + "nullable": true + } + } + }, + "Orders.Put.Api.Shipment.ShipmentId.Bad.Request.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Orders.Put.Api.Shipment.ShipmentId.OK.OneOfArray": { + "type": "array", + "additionalProperties": false, + "items": { + "description": "Information about a shipment", + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.ShipmentViewModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.InternalShipmentViewModel" + } + ] + } + }, + "Orders.Put.Api.Shipment.ShipmentId.Shipbob.Channel.Id.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Orders.Put.Api.Shipment.ShipmentId.ShipmentId.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Orders.RecipientInfoViewModel": { + "type": "object", + "description": "Information about the recipient of an order", + "additionalProperties": false, + "required": [ + "address", + "name" + ], + "properties": { + "address": { + "description": "Address of the recipient", + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.AddressViewModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.RetailerProgramDataAddressViewModel" + } + ] + }, + "email": { + "type": "string", + "description": "Email address of the recipient", + "format": "email", + "example": "john@example.com", + "additionalProperties": false, + "nullable": true + }, + "name": { + "type": "string", + "description": "Name of the recipient", + "maxLength": 300, + "minLength": 1, + "example": "John Doe", + "additionalProperties": false + }, + "phone_number": { + "type": "string", + "description": "Phone number of the recipient", + "maxLength": 50, + "example": "555-555-5555", + "additionalProperties": false, + "nullable": true + } + } + }, + "Orders.RecipientViewModel": { + "type": "object", + "description": "Information about the recipient of a shipment", + "additionalProperties": false, + "properties": { + "address": { + "description": "Address of the recipient", + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.AddressViewModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.RetailerProgramDataAddressViewModel" + } + ], + "nullable": true + }, + "email": { + "type": "string", + "description": "Email address of the recipient", + "format": "email", + "example": "john@example.com", + "additionalProperties": false, + "nullable": true + }, + "full_name": { + "type": "string", + "description": "FullName of the recipient", + "example": "John Doe", + "additionalProperties": false, + "nullable": true + }, + "name": { + "type": "string", + "description": "Name of the recipient", + "example": "John Doe", + "additionalProperties": false, + "nullable": true + }, + "phone_number": { + "type": "string", + "description": "Phone number of the recipient", + "format": "tel", + "example": "555-555-5555", + "additionalProperties": false, + "nullable": true + } + } + }, + "Orders.RetailerProgramDataAddressViewModel": { + "type": "object", + "description": "Address to used when creating a B2B/DropShip order.", + "additionalProperties": false, + "required": [ + "type" + ], + "properties": { + "type": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.AddressType" + } + }, + "allOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.AddressViewModel" + } + ] + }, + "Orders.RetailerProgramDataViewModel": { + "type": "object", + "description": "Contains properties that needs to be used for fulfilling B2B/Dropship orders.", + "additionalProperties": false, + "required": [ + "purchaseOrderNumber", + "retailerProgramType" + ], + "properties": { + "addresses": { + "type": "array", + "description": "Ship From - Certain retailers want to display the ship from address as their return facility, not Shipbob’s warehouse address /// \r\nMark For Address - Final destination address", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.RetailerProgramDataAddressViewModel" + }, + "nullable": true + }, + "customer_ticket_number": { + "type": "string", + "description": "Customer Ticket Number", + "additionalProperties": false, + "nullable": true + }, + "delivery_date": { + "type": "string", + "description": "Expected delivery date", + "format": "date-time", + "additionalProperties": false, + "nullable": true + }, + "department": { + "type": "string", + "description": "Identifies a merchant's store department", + "additionalProperties": false, + "nullable": true + }, + "doNotShipBeforeDate": { + "type": "string", + "description": "The date the retailer does not want the order shipped by.", + "format": "date-time", + "additionalProperties": false, + "nullable": true + }, + "mark_for_store": { + "type": "string", + "description": "Store Number", + "additionalProperties": false, + "nullable": true + }, + "purchase_order_number": { + "type": "string", + "description": "First initial documentation sent from buyer to seller with item(s) and quantities.", + "minLength": 1, + "additionalProperties": false + }, + "retailer_program_type": { + "type": "string", + "description": "Identifies retailer-merchant combination", + "minLength": 1, + "additionalProperties": false + }, + "shipByDate": { + "type": "string", + "description": "The date the retailer has requested the order to ship by.", + "format": "date-time", + "additionalProperties": false, + "nullable": true + } + } + }, + "Orders.ServiceLevelDetailViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "integer", + "description": "Unique id for the service level", + "format": "int32", + "additionalProperties": false + }, + "name": { + "type": "string", + "description": "The name or title of the service level", + "additionalProperties": false, + "nullable": true + } + } + }, + "Orders.ShipMethodDetailViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "active": { + "type": "boolean", + "description": "Indicates if the shipping method is active", + "additionalProperties": false + }, + "default": { + "type": "boolean", + "description": "Indicates the shipping method is a ShipBob default shipping method.", + "additionalProperties": false + }, + "id": { + "type": "integer", + "description": "Unique id for shipping method.", + "format": "int32", + "additionalProperties": false + }, + "name": { + "type": "string", + "description": "Name of the ship method as selected by the merchant and saved in ShipBob’s database (i.e. “ground”). Corresponds to the shipping_method field in the Orders API.", + "additionalProperties": false, + "nullable": true + }, + "service_level": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.ServiceLevelDetailViewModel" + } + } + }, + "Orders.ShipMethodDetailViewModelArray": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.ShipMethodDetailViewModel" + } + }, + "Orders.ShipmentAction": { + "type": "string", + "additionalProperties": false, + "enum": [ + "CleanSweep", + "Reassign", + "ReleaseOrderHold", + "MoveToOnHoldAndKeepInventory", + "MoveToOnHoldAndReleaseInventory", + "Cancel", + "AddLineItem", + "RemoveLineItem", + "UpdateShipOption" + ] + }, + "Orders.ShipmentLogViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "log_type_id": { + "type": "integer", + "description": "Log type id of the shipment", + "format": "int32", + "additionalProperties": false + }, + "log_type_name": { + "type": "string", + "description": "Name of the log type", + "additionalProperties": false, + "nullable": true + }, + "log_type_text": { + "type": "string", + "description": "Summary of log type meaning", + "additionalProperties": false, + "nullable": true + }, + "metadata": { + "type": "object", + "description": "Specifics data for the event", + "additionalProperties": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "nullable": true + }, + "timestamp": { + "type": "string", + "description": "Timestamp of event", + "format": "date-time", + "additionalProperties": false + } + } + }, + "Orders.ShipmentLogViewModelArray": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.ShipmentLogViewModel" + } + }, + "Orders.ShipmentProductViewModel": { + "type": "object", + "description": "Information about a store product belonging to a shipment", + "additionalProperties": false, + "properties": { + "id": { + "type": "integer", + "description": "Unique id of the product", + "format": "int32", + "additionalProperties": false + }, + "inventory_items": { + "type": "array", + "description": "Information about fulfillable inventory items belonging to this product", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.InventoryViewModel" + }, + "nullable": true + }, + "name": { + "type": "string", + "description": "Name of the product", + "example": "Medium Blue T-Shirt", + "additionalProperties": false, + "nullable": true + }, + "reference_id": { + "type": "string", + "description": "Unique reference id of the product", + "example": "TShirtBlueM", + "additionalProperties": false, + "nullable": true + }, + "sku": { + "type": "string", + "description": "Stock keeping unit for the product", + "example": "TShirtBlueM", + "additionalProperties": false, + "nullable": true + } + } + }, + "Orders.ShipmentStatusFilter": { + "type": "string", + "additionalProperties": false, + "enum": [ + "Processing", + "OnHold", + "Exception", + "Picked", + "Packed", + "Shipped", + "InTransit", + "Delivered", + "DeliveryException" + ] + }, + "Orders.ShipmentStatusViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "location_id": { + "type": "integer", + "description": "Unique ShipBob Id of the Fulfillment Center to which the shipment was assigned", + "format": "int32", + "additionalProperties": false + }, + "order_id": { + "type": "integer", + "description": "Unique ShipBob Id of the parent order", + "format": "int64", + "additionalProperties": false + }, + "reference_id": { + "type": "string", + "description": "The Reference Id ingested with the original order", + "additionalProperties": false, + "nullable": true + }, + "shipment_id": { + "type": "integer", + "description": "Unique ShipBob Id of the shipment", + "format": "int32", + "additionalProperties": false + }, + "status_datetime": { + "type": "string", + "description": "Datetime when the shipment entered into the requested status (according to request filters)", + "format": "date-time", + "additionalProperties": false + }, + "store_order_id": { + "type": "string", + "description": "The Store Order Id ingested with the original order", + "additionalProperties": false, + "nullable": true + }, + "store_order_tags": { + "type": "string", + "description": "The raw tag data ingested with the original store order", + "additionalProperties": false, + "nullable": true + } + } + }, + "Orders.ShipmentStatusViewModelArray": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.ShipmentStatusViewModel" + } + }, + "Orders.ShipmentViewModel": { + "type": "object", + "description": "Information about a shipment", + "additionalProperties": false, + "properties": { + "actual_fulfillment_date": { + "type": "string", + "description": "The datetime of ShipBob’s completion of the fulfillment operation as promised.\r\nCurrently, this means the shipment has been picked, packed, and label has been printed.", + "format": "date-time", + "additionalProperties": false, + "nullable": true + }, + "created_date": { + "type": "string", + "description": "Date this shipment was created", + "format": "date-time", + "additionalProperties": false + }, + "delivery_date": { + "type": "string", + "description": "The datetime of Shipment delivered to customer.", + "format": "date-time", + "additionalProperties": false, + "nullable": true + }, + "estimated_fulfillment_date": { + "type": "string", + "description": "The datetime of ShipBob’s commitment for completing\r\nthe shipment and handing to the carrier for delivery.", + "format": "date-time", + "additionalProperties": false, + "nullable": true + }, + "estimated_fulfillment_date_status": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.FulfillmentStatus" + }, + "gift_message": { + "type": "string", + "description": "Gift message associated with the shipment", + "maxLength": 500, + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "integer", + "description": "Unique id of the shipment", + "format": "int32", + "additionalProperties": false + }, + "insurance_value": { + "type": "number", + "description": "Monetary amount that this shipment was insured for", + "format": "currency", + "additionalProperties": false, + "nullable": true + }, + "invoice_amount": { + "type": "number", + "description": "Monetary amount that was invoiced for this shipment", + "format": "currency", + "additionalProperties": false, + "nullable": true + }, + "invoice_currency_code": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "is_tracking_uploaded": { + "type": "boolean", + "description": "Indicates whether the Shipment was marked with tracking information\r\nuploaded to a third-party system where the order originated.", + "additionalProperties": false + }, + "last_tracking_update_at": { + "type": "string", + "description": "Timestamp for the last time this shipment had a tracking update", + "format": "date-time", + "additionalProperties": false, + "nullable": true + }, + "last_update_at": { + "type": "string", + "description": "Date this shipment was last updated", + "format": "date-time", + "additionalProperties": false, + "nullable": true + }, + "location": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.FulfillmentCenterViewModel" + }, + "measurements": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.MeasurementsViewModel" + }, + "order_id": { + "type": "integer", + "description": "Id of the order this shipment belongs to", + "format": "int32", + "additionalProperties": false + }, + "package_material_type": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.PackageMaterialType" + }, + "parent_cartons": { + "type": "array", + "description": "Carton information for this shipment", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.ParentCartonViewModel" + }, + "nullable": true + }, + "products": { + "type": "array", + "description": "Information about the products contained in this shipment", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.ShipmentProductViewModel" + }, + "nullable": true + }, + "recipient": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.RecipientViewModel" + }, + "reference_id": { + "type": "string", + "description": "Client-defined external unique id of the order this shipment belongs to", + "additionalProperties": false, + "nullable": true + }, + "require_signature": { + "type": "boolean", + "description": "If a shipment requires signature", + "additionalProperties": false + }, + "ship_option": { + "type": "string", + "description": "Name of the shipping option used for this shipment", + "example": "Standard", + "additionalProperties": false, + "nullable": true + }, + "status": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.OrderStatusEnum" + }, + "status_details": { + "type": "array", + "description": "Additional details about the shipment status", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.StatusDetailViewModel" + }, + "nullable": true + }, + "tracking": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.TrackingViewModel" + } + } + }, + "Orders.ShippingTermsViewModel": { + "type": "object", + "description": "Contains shipping properties that need to be used for fulfilling an order.", + "additionalProperties": false, + "properties": { + "carrier_type": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.CarrierShipType" + }, + "payment_term": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.PaymentShipTerm" + } + } + }, + "Orders.SortOrder": { + "type": "string", + "additionalProperties": false, + "enum": [ + "Newest", + "Oldest" + ] + }, + "Orders.StatusDetailViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "description": { + "type": "string", + "description": "Describes what the status detail means", + "additionalProperties": false, + "nullable": true + }, + "exception_fulfillment_center_id": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "extra_information": { + "additionalProperties": false, + "$ref": "#/components/schemas/Orders.StatusInformationViewModel" + }, + "id": { + "type": "integer", + "description": "The id of the status detail", + "format": "int32", + "additionalProperties": false + }, + "inventory_id": { + "type": "integer", + "description": "Inventory Id the detail applies to (if applicable)", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "name": { + "type": "string", + "description": "Short name of the status detail", + "additionalProperties": false, + "nullable": true + } + } + }, + "Orders.StatusInformationViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "validation_messages": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + }, + "nullable": true + } + } + }, + "Orders.TagViewModel": { + "type": "object", + "additionalProperties": false, + "required": [ + "name", + "value" + ], + "properties": { + "name": { + "type": "string", + "description": "The key of the tag", + "maxLength": 50, + "minLength": 1, + "example": "Handling instructions", + "additionalProperties": false + }, + "value": { + "type": "string", + "description": "The value of the tag", + "maxLength": 500, + "minLength": 1, + "example": "Fragile", + "additionalProperties": false + } + } + }, + "Orders.TrackingViewModel": { + "type": "object", + "description": "Tracking information for a shipment", + "additionalProperties": false, + "properties": { + "bol": { + "type": "string", + "description": "Bill of lading (BOL) number. Document acknowledging receipt of cargo for shipment.", + "additionalProperties": false, + "nullable": true + }, + "carrier": { + "type": "string", + "description": "Carrier of the shipment", + "example": "USPS", + "additionalProperties": false, + "nullable": true + }, + "carrier_service": { + "type": "string", + "description": "The carrier's service which was used for this shipment", + "example": "Priority", + "additionalProperties": false, + "nullable": true + }, + "pro_number": { + "type": "string", + "description": "Tracking number used for freight carriers", + "additionalProperties": false, + "nullable": true + }, + "scac": { + "type": "string", + "description": "Standard Carrier Alpha Code (SCAC). Unique 2-4 letter code used to identify transportation companies.", + "additionalProperties": false, + "nullable": true + }, + "shipping_date": { + "type": "string", + "description": "Date freight was shipped on", + "format": "date-time", + "additionalProperties": false, + "nullable": true + }, + "tracking_number": { + "type": "string", + "description": "Tracking number of the shipment", + "example": "860C8CDC8F0B4FC7AB69AC86C20539EC", + "additionalProperties": false, + "nullable": true + }, + "tracking_url": { + "type": "string", + "description": "URL to the website where a shipment can be tracked", + "example": "https://www.example.com/tracking?id=860C8CDC8F0B4FC7AB69AC86C20539EC", + "additionalProperties": false, + "nullable": true + } + } + }, + "Orders.UpdateShipmentModel": { + "type": "object", + "description": "Model for Updating multiple shipments of the same Order", + "additionalProperties": false, + "properties": { + "is_tracking_uploaded": { + "type": "boolean", + "description": "Indicates whether the Shipment was marked with tracking information\r\nuploaded to a third-party system where the order originated.", + "additionalProperties": false + } + } + }, + "Products.AdditionalHazmatAttributesRequestModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "charge_state_percentage": { + "type": "number", + "format": "double", + "additionalProperties": false, + "nullable": true + }, + "container_metal": { + "type": "boolean", + "additionalProperties": false, + "deprecated": true, + "nullable": true + }, + "container_type": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "lithium_battery_packaging": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "lithium_battery_type": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "magnet": { + "type": "boolean", + "additionalProperties": false, + "nullable": true + }, + "net_volume": { + "type": "number", + "format": "double", + "additionalProperties": false, + "nullable": true + }, + "net_weight": { + "type": "number", + "format": "double", + "additionalProperties": false, + "nullable": true + } + } + }, + "Products.AdditionalHazmatAttributesViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "charge_state_percentage": { + "type": "number", + "format": "double", + "additionalProperties": false, + "nullable": true + }, + "container_metal": { + "type": "boolean", + "additionalProperties": false, + "deprecated": true, + "nullable": true + }, + "container_type": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "lithium_battery_packaging": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "lithium_battery_type": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "magnet": { + "type": "boolean", + "additionalProperties": false, + "nullable": true + }, + "net_volume": { + "type": "number", + "format": "double", + "additionalProperties": false, + "nullable": true + }, + "net_weight": { + "type": "number", + "format": "double", + "additionalProperties": false, + "nullable": true + } + } + }, + "Products.AmazonChannelMetadataRequestModel": { + "type": "object", + "description": "Amazon Sales Channel Information with custom Amazon Fields", + "additionalProperties": false, + "properties": { + "asin": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "fnsku": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "fulfillment_channel": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "platform": { + "type": "string", + "readOnly": true, + "additionalProperties": false, + "nullable": true + } + }, + "allOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ChannelMetadataRequestModel" + } + ] + }, + "Products.AmazonChannelMetadataViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "asin": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "fnsku": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "fulfillment_channel": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + }, + "allOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ChannelMetadataViewModel" + } + ] + }, + "Products.AmazonProductChannelMetadataModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "asin": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "fnsku": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "fulfillment_channel": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + }, + "allOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BaseProductChannelMetadataModel" + } + ] + }, + "Products.ApplicableCategoryViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "sub_category_ids": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "nullable": true + } + } + }, + "Products.AssociatedBundlesViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "product_id": { + "type": "integer", + "format": "int64", + "additionalProperties": false + }, + "product_name": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "quantity": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "variant_id": { + "type": "integer", + "format": "int64", + "additionalProperties": false + }, + "variant_sku": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Products.BarcodeModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "sticker_url": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "value": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Products.BarcodeRequestModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "sticker_url": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "value": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Products.BarcodeViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "sticker_url": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "value": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Products.BaseAdditionalHazmatAttributesModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "charge_state_percentage": { + "type": "number", + "format": "double", + "additionalProperties": false, + "nullable": true + }, + "container_metal": { + "type": "boolean", + "additionalProperties": false, + "deprecated": true, + "nullable": true + }, + "container_type": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "lithium_battery_packaging": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "lithium_battery_type": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "magnet": { + "type": "boolean", + "additionalProperties": false, + "nullable": true + }, + "net_volume": { + "type": "number", + "format": "double", + "additionalProperties": false, + "nullable": true + }, + "net_weight": { + "type": "number", + "format": "double", + "additionalProperties": false, + "nullable": true + } + } + }, + "Products.BaseBundleDefinitionModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "quantity": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "variant_id": { + "type": "integer", + "format": "int64", + "additionalProperties": false + } + } + }, + "Products.BaseChannelMetadataRequestModel": { + "type": "object", + "description": "Standard Channel Metadata Record to store SellerSKU for a Sales Channel", + "additionalProperties": false, + "allOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ChannelMetadataRequestModel" + } + ] + }, + "Products.BaseCustomsModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "country_code_of_origin": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "currency": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "description": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "hs_tariff_code": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "is321_eligible": { + "type": "boolean", + "additionalProperties": false + }, + "value": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + } + } + }, + "Products.BaseDimensionModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "height": { + "type": "number", + "format": "double", + "additionalProperties": false + }, + "length": { + "type": "number", + "format": "double", + "additionalProperties": false + }, + "width": { + "type": "number", + "format": "double", + "additionalProperties": false + } + } + }, + "Products.BaseFulfillmentSettingsModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "dangerous_goods": { + "type": "boolean", + "additionalProperties": false + }, + "is_bpm_parcel": { + "type": "boolean", + "additionalProperties": false + }, + "is_case_pick": { + "type": "boolean", + "additionalProperties": false + }, + "msds_url": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "requires_prop65": { + "type": "boolean", + "additionalProperties": false + }, + "serial_scan": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BaseSerialScanModel" + } + } + }, + "Products.BaseLotInformationModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "is_lot": { + "type": "boolean", + "additionalProperties": false + }, + "minimum_shelf_life_days": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + } + } + }, + "Products.BaseProductChannelMetadataModel": { + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ProductChannelMetadataModel" + } + ] + }, + "Products.BaseProductRequestModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "taxonomy_id": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "type_id": { + "type": "integer", + "format": "int32", + "additionalProperties": false + } + } + }, + "Products.BaseProductVariantModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "additional_hazmat_attributes": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BaseAdditionalHazmatAttributesModel" + }, + "bundle_definition": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BaseBundleDefinitionModel" + }, + "nullable": true + }, + "channel_metadata": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.AmazonProductChannelMetadataModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BaseProductChannelMetadataModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BigCommerceProductChannelMetadataModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ShopifyProductChannelMetadataModel" + } + ] + }, + "nullable": true + }, + "customs": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BaseCustomsModel" + }, + "dimension": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BaseDimensionModel" + }, + "fulfillment_settings": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BaseFulfillmentSettingsModel" + }, + "gtin": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "is_digital": { + "type": "boolean", + "additionalProperties": false + }, + "lot_information": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BaseLotInformationModel" + }, + "name": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "packaging_material_type_id": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "packaging_requirement_id": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "return_preferences": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BaseReturnPreferencesModel" + }, + "reviews_pending": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ReviewsPendingType" + }, + "nullable": true + }, + "sku": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "status": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.VariantStatus" + }, + "upc": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "weight": { + "type": "number", + "format": "double", + "additionalProperties": false + } + } + }, + "Products.BaseProductVariantRequestModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "additional_hazmat_attributes": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.AdditionalHazmatAttributesRequestModel" + }, + "bundle_definition": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BundleDefinitionRequestModel" + }, + "nullable": true + }, + "channel_metadata": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.AmazonChannelMetadataRequestModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BaseChannelMetadataRequestModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BigCommerceChannelMetadataRequestModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ShopifyChannelMetadataRequestModel" + } + ] + }, + "nullable": true + }, + "customs": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.CustomsRequestModel" + }, + "dimension": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.DimensionRequestModel" + }, + "fulfillment_settings": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.FulfillmentSettingsRequestModel" + }, + "gtin": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "is_digital": { + "type": "boolean", + "additionalProperties": false + }, + "lot_information": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.LotInformationRequestModel" + }, + "name": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "packaging_material_type_id": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "packaging_requirement_id": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "return_preferences": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ReturnPreferencesRequestModel" + }, + "sku": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "status_id": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "upc": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "weight": { + "type": "number", + "format": "double", + "additionalProperties": false + } + } + }, + "Products.BaseReturnPreferencesModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "backup_action_id": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "instructions": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "primary_action_id": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "return_to_sender_backup_action_id": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "return_to_sender_primary_action_id": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + } + } + }, + "Products.BaseSerialScanModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "exact_character_length": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "is_enabled": { + "type": "boolean", + "additionalProperties": false + }, + "prefix": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "suffix": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Products.BaseTaxonomyViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "name": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "path": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Products.BigCommerceChannelMetadataRequestModel": { + "type": "object", + "description": "BigCommerce Sales Channel Information with custom Amazon Fields", + "additionalProperties": false, + "properties": { + "platform": { + "type": "string", + "readOnly": true, + "additionalProperties": false, + "nullable": true + }, + "platform_product_id": { + "type": "integer", + "format": "int64", + "additionalProperties": false, + "nullable": true + }, + "platform_variant_id": { + "type": "integer", + "format": "int64", + "additionalProperties": false, + "nullable": true + } + }, + "allOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ChannelMetadataRequestModel" + } + ] + }, + "Products.BigCommerceChannelMetadataViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "platform_product_id": { + "type": "integer", + "format": "int64", + "additionalProperties": false, + "nullable": true + }, + "platform_variant_id": { + "type": "integer", + "format": "int64", + "additionalProperties": false, + "nullable": true + } + }, + "allOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ChannelMetadataViewModel" + } + ] + }, + "Products.BigCommerceProductChannelMetadataModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "platform_product_id": { + "type": "integer", + "format": "int64", + "additionalProperties": false, + "nullable": true + }, + "platform_variant_id": { + "type": "integer", + "format": "int64", + "additionalProperties": false, + "nullable": true + } + }, + "allOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BaseProductChannelMetadataModel" + } + ] + }, + "Products.BundleDefinitionRequestModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "quantity": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "variant_id": { + "type": "integer", + "format": "int64", + "additionalProperties": false + } + } + }, + "Products.BundleDefinitionViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "product_id": { + "type": "integer", + "format": "int64", + "additionalProperties": false + }, + "quantity": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "variant_id": { + "type": "integer", + "format": "int64", + "additionalProperties": false + }, + "variant_name": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "variant_sku": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Products.ChannelMetadataRequestModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "channel_id": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "currency": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "integer", + "format": "int64", + "additionalProperties": false, + "nullable": true + }, + "is_inventory_sync_enabled": { + "type": "boolean", + "additionalProperties": false + }, + "legacy_product_id": { + "type": "integer", + "format": "int64", + "additionalProperties": false, + "nullable": true + }, + "platform": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "platform_identifier": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "platform_inventory_item_id": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "price": { + "type": "number", + "format": "double", + "additionalProperties": false + }, + "seller_sku": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Products.ChannelMetadataViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "additionalProperties": false + }, + "channel_name": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "currency": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "integer", + "format": "int64", + "additionalProperties": false + }, + "is_inventory_sync_enabled": { + "type": "boolean", + "additionalProperties": false + }, + "legacy_product_id": { + "type": "integer", + "format": "int64", + "additionalProperties": false, + "nullable": true + }, + "platform": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "platform_identifier": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "platform_inventory_item_id": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "price": { + "type": "number", + "format": "double", + "additionalProperties": false + }, + "seller_sku": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Products.ChildTaxonomyViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "has_children": { + "type": "boolean", + "additionalProperties": false + } + }, + "allOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BaseTaxonomyViewModel" + } + ] + }, + "Products.ComplianceViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "category": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + }, + "nullable": true + }, + "reasons": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + }, + "nullable": true + }, + "status": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Products.ConvertVariantToBundleRequest": { + "type": "object", + "example": { + "bundle_definition": [ + { + "quantity": 0, + "variant_id": 0 + } + ], + "channel_metadata": [ + { + "asin": "string", + "channel_id": 0, + "currency": "string", + "fnsku": "string", + "fulfillment_channel": "string", + "id": 0, + "is_inventory_sync_enabled": true, + "legacy_product_id": 0, + "platform": "string", + "platform_identifier": "string", + "platform_inventory_item_id": "string", + "price": 0.1, + "seller_sku": "string" + } + ], + "name": "string", + "sku": "string" + }, + "additionalProperties": false, + "properties": { + "bundle_definition": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BundleDefinitionRequestModel" + }, + "nullable": true + }, + "channel_metadata": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.AmazonChannelMetadataRequestModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BaseChannelMetadataRequestModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BigCommerceChannelMetadataRequestModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ShopifyChannelMetadataRequestModel" + } + ] + }, + "nullable": true + }, + "name": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "sku": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Products.CreateProductRequestModelV5": { + "type": "object", + "example": { + "is_quarantine": true, + "name": "string", + "taxonomy_id": 0, + "type_id": 0, + "variants": [ + { + "additional_hazmat_attributes": { + "charge_state_percentage": 0.1, + "container_metal": true, + "container_type": "string", + "lithium_battery_packaging": "string", + "lithium_battery_type": "string", + "magnet": true, + "net_volume": 0.1, + "net_weight": 0.1 + }, + "barcodes": [ + { + "sticker_url": "string", + "value": "string" + } + ], + "bundle_definition": [ + { + "quantity": 0, + "variant_id": 0 + } + ], + "channel_metadata": [ + { + "asin": "string", + "channel_id": 0, + "currency": "string", + "fnsku": "string", + "fulfillment_channel": "string", + "id": 0, + "is_inventory_sync_enabled": true, + "legacy_product_id": 0, + "platform": "string", + "platform_identifier": "string", + "platform_inventory_item_id": "string", + "price": 0.1, + "seller_sku": "string" + } + ], + "customs": { + "country_code_of_origin": "string", + "description": "string", + "hs_tariff_code": "string", + "is321_eligible": true, + "value": 0 + }, + "dimension": { + "height": 0.1, + "length": 0.1, + "width": 0.1 + }, + "fulfillment_settings": { + "dangerous_goods": true, + "is_bpm_parcel": true, + "is_case_pick": true, + "msds_url": "string", + "requires_prop65": true, + "serial_scan": { + "exact_character_length": 0, + "is_enabled": true, + "prefix": "string", + "suffix": "string" + } + }, + "gtin": "string", + "is_digital": true, + "lot_information": { + "is_lot": true, + "minimum_shelf_life_days": 0 + }, + "name": "string", + "packaging_material_type_id": 0, + "packaging_requirement_id": 0, + "return_preferences": { + "backup_action_id": 0, + "instructions": "string", + "primary_action_id": 0, + "return_to_sender_backup_action_id": 0, + "return_to_sender_primary_action_id": 0 + }, + "sku": "string", + "status_id": 0, + "upc": "string", + "weight": 0.1 + } + ] + }, + "additionalProperties": false, + "properties": { + "is_quarantine": { + "type": "boolean", + "additionalProperties": false + }, + "variants": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.CreateProductVariantRequestModelV5" + }, + "nullable": true + } + }, + "allOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BaseProductRequestModel" + } + ] + }, + "Products.CreateProductVariantRequestModelV5": { + "type": "object", + "additionalProperties": false, + "properties": { + "barcodes": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BarcodeRequestModel" + }, + "nullable": true + } + }, + "allOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BaseProductVariantRequestModel" + } + ] + }, + "Products.CreateProductVariantRequestModelV5Array": { + "type": "array", + "example": [ + { + "additional_hazmat_attributes": { + "charge_state_percentage": 0.1, + "container_metal": true, + "container_type": "string", + "lithium_battery_packaging": "string", + "lithium_battery_type": "string", + "magnet": true, + "net_volume": 0.1, + "net_weight": 0.1 + }, + "barcodes": [ + { + "sticker_url": "string", + "value": "string" + } + ], + "bundle_definition": [ + { + "quantity": 0, + "variant_id": 0 + } + ], + "channel_metadata": [ + { + "asin": "string", + "channel_id": 0, + "currency": "string", + "fnsku": "string", + "fulfillment_channel": "string", + "id": 0, + "is_inventory_sync_enabled": true, + "legacy_product_id": 0, + "platform": "string", + "platform_identifier": "string", + "platform_inventory_item_id": "string", + "price": 0.1, + "seller_sku": "string" + } + ], + "customs": { + "country_code_of_origin": "string", + "description": "string", + "hs_tariff_code": "string", + "is321_eligible": true, + "value": 0 + }, + "dimension": { + "height": 0.1, + "length": 0.1, + "width": 0.1 + }, + "fulfillment_settings": { + "dangerous_goods": true, + "is_bpm_parcel": true, + "is_case_pick": true, + "msds_url": "string", + "requires_prop65": true, + "serial_scan": { + "exact_character_length": 0, + "is_enabled": true, + "prefix": "string", + "suffix": "string" + } + }, + "gtin": "string", + "is_digital": true, + "lot_information": { + "is_lot": true, + "minimum_shelf_life_days": 0 + }, + "name": "string", + "packaging_material_type_id": 0, + "packaging_requirement_id": 0, + "return_preferences": { + "backup_action_id": 0, + "instructions": "string", + "primary_action_id": 0, + "return_to_sender_backup_action_id": 0, + "return_to_sender_primary_action_id": 0 + }, + "sku": "string", + "status_id": 0, + "upc": "string", + "weight": 0.1 + } + ], + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.CreateProductVariantRequestModelV5" + } + }, + "Products.CustomsRequestModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "country_code_of_origin": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "description": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "hs_tariff_code": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "is321_eligible": { + "type": "boolean", + "additionalProperties": false + }, + "value": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + } + } + }, + "Products.CustomsViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "country_code_of_origin": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "currency": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "description": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "hs_tariff_code": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "is321_eligible": { + "type": "boolean", + "additionalProperties": false + }, + "value": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + } + } + }, + "Products.Delete.Api.V5.Product.ProductId.Bad.Request.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Products.Delete.Api.V5.Product.ProductId.Not.Found.OneOf.ProblemDetails.HttpValidationProblemDetails": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ProblemDetails" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.HttpValidationProblemDetails" + } + ] + }, + "Products.Delete.Api.V5.Product.ProductId.ProductId.Integer": { + "type": "integer", + "format": "int64", + "additionalProperties": false + }, + "Products.Delete.Api.V5.Variant.VariantId.Channel.Metadata.ChannelMetadataId.Bad.Request.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Products.Delete.Api.V5.Variant.VariantId.Channel.Metadata.ChannelMetadataId.ChannelMetadataId.Integer": { + "type": "integer", + "format": "int64", + "additionalProperties": false + }, + "Products.Delete.Api.V5.Variant.VariantId.Channel.Metadata.ChannelMetadataId.Not.Found.OneOf.ProblemDetails.HttpValidationProblemDetails": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ProblemDetails" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.HttpValidationProblemDetails" + } + ] + }, + "Products.Delete.Api.V5.Variant.VariantId.Channel.Metadata.ChannelMetadataId.OK.OneOf.VariantViewModelV5.VariantInternalViewModelV5": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.VariantViewModelV5" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.VariantInternalViewModelV5" + } + ] + }, + "Products.Delete.Api.V5.Variant.VariantId.Channel.Metadata.ChannelMetadataId.VariantId.Integer": { + "type": "integer", + "format": "int64", + "additionalProperties": false + }, + "Products.DimensionRequestModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "height": { + "type": "number", + "format": "double", + "additionalProperties": false + }, + "length": { + "type": "number", + "format": "double", + "additionalProperties": false + }, + "width": { + "type": "number", + "format": "double", + "additionalProperties": false + } + } + }, + "Products.DimensionViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "height": { + "type": "number", + "format": "double", + "additionalProperties": false + }, + "is_locked": { + "type": "boolean", + "additionalProperties": false + }, + "length": { + "type": "number", + "format": "double", + "additionalProperties": false + }, + "source": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "unit": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "width": { + "type": "number", + "format": "double", + "additionalProperties": false + } + } + }, + "Products.EnumViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "integer", + "format": "int64", + "additionalProperties": false + }, + "name": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Products.FulfillmentSettingsRequestModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "dangerous_goods": { + "type": "boolean", + "additionalProperties": false + }, + "is_bpm_parcel": { + "type": "boolean", + "additionalProperties": false + }, + "is_case_pick": { + "type": "boolean", + "additionalProperties": false + }, + "msds_url": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "requires_prop65": { + "type": "boolean", + "additionalProperties": false + }, + "serial_scan": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.SerialScanRequestModel" + } + } + }, + "Products.FulfillmentSettingsViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "dangerous_goods": { + "type": "boolean", + "additionalProperties": false + }, + "is_bpm_parcel": { + "type": "boolean", + "additionalProperties": false + }, + "is_case_pick": { + "type": "boolean", + "additionalProperties": false + }, + "msds_url": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "requires_prop65": { + "type": "boolean", + "additionalProperties": false + }, + "serial_scan": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.SerialScanViewModel" + } + } + }, + "Products.Get.Api.Product.LastUpdatedTimestamp.DateTime": { + "type": "string", + "description": "Looks for Products that have been updated since the given date", + "additionalProperties": false + }, + "Products.Get.Api.V5.Product.Bad.Request.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Products.Get.Api.V5.Product.Barcode.Int": { + "description": "Barcode Associated with variant", + "additionalProperties": false + }, + "Products.Get.Api.V5.Product.Barcode.String": { + "type": "string", + "description": "Barcode Associated with variant", + "additionalProperties": false + }, + "Products.Get.Api.V5.Product.Barcodes.List.String": { + "description": "Barcodes Associated with variant", + "additionalProperties": false + }, + "Products.Get.Api.V5.Product.CategoryIds.List.Int": { + "description": "List of Category Ids associated with product", + "additionalProperties": false + }, + "Products.Get.Api.V5.Product.ChannelIds.List.Int": { + "description": "Looks for Products variants by their channel IDs", + "additionalProperties": false + }, + "Products.Get.Api.V5.Product.HasDigitalVariants.Boolean": { + "description": "Looks for Products with/without digital variants", + "additionalProperties": false + }, + "Products.Get.Api.V5.Product.HasVariants.Boolean": { + "description": "Looks for Products with/without variants", + "additionalProperties": false + }, + "Products.Get.Api.V5.Product.InventoryId.List.Int": { + "description": "Looks for variants by its associated inventory id", + "additionalProperties": false + }, + "Products.Get.Api.V5.Product.LastUpdatedTimestamp.DateTime": { + "description": "Looks for Products that have been updated since the given date", + "additionalProperties": false + }, + "Products.Get.Api.V5.Product.LegacyIds.List.Int": { + "description": "Looks for Products with by Legacy Product Id(s)", + "additionalProperties": false + }, + "Products.Get.Api.V5.Product.Name.String": { + "description": "Looks for Products/Variants by name", + "additionalProperties": false + }, + "Products.Get.Api.V5.Product.Not.Found.OneOf.ProblemDetails.HttpValidationProblemDetails": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ProblemDetails" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.HttpValidationProblemDetails" + } + ] + }, + "Products.Get.Api.V5.Product.OnHand.Integer": { + "description": "Looks for Products with inventory", + "additionalProperties": false + }, + "Products.Get.Api.V5.Product.PageSize.Int": { + "additionalProperties": false + }, + "Products.Get.Api.V5.Product.PlatformIds.List.String": { + "description": "Looks for Products variants by their external Platform IDs", + "additionalProperties": false + }, + "Products.Get.Api.V5.Product.ProductId.Bad.Request.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Products.Get.Api.V5.Product.ProductId.List.Int": { + "description": "Looks for Products with an assigned Id", + "additionalProperties": false + }, + "Products.Get.Api.V5.Product.ProductId.Not.Found.OneOf.ProblemDetails.HttpValidationProblemDetails": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ProblemDetails" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.HttpValidationProblemDetails" + } + ] + }, + "Products.Get.Api.V5.Product.ProductId.ProductId.Integer": { + "type": "integer", + "format": "int64", + "additionalProperties": false + }, + "Products.Get.Api.V5.Product.ProductId.Variants.Bad.Request.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Products.Get.Api.V5.Product.ProductId.Variants.Not.Found.OneOf.ProblemDetails.HttpValidationProblemDetails": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ProblemDetails" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.HttpValidationProblemDetails" + } + ] + }, + "Products.Get.Api.V5.Product.ProductId.Variants.OK.OneOfArray": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.VariantViewModelV5" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.VariantInternalViewModelV5" + } + ] + } + }, + "Products.Get.Api.V5.Product.ProductId.Variants.ProductId.Integer": { + "type": "integer", + "format": "int64", + "additionalProperties": false + }, + "Products.Get.Api.V5.Product.ProductType.Integer": { + "description": "Looks for Products by type", + "additionalProperties": false + }, + "Products.Get.Api.V5.Product.ReviewsPending.List.ReviewsPendingType": { + "description": "Looks for Products by ReviewsPending", + "additionalProperties": false + }, + "Products.Get.Api.V5.Product.SKU.String": { + "description": "Looks for Products that match the provided Sku query", + "additionalProperties": false + }, + "Products.Get.Api.V5.Product.SalesChannel.List.String": { + "description": "Looks for Products variants assigned to a platform/sales channel ", + "additionalProperties": false + }, + "Products.Get.Api.V5.Product.Search.String": { + "type": "string", + "additionalProperties": false + }, + "Products.Get.Api.V5.Product.SellerSKU.String": { + "description": "Looks for Products that match the provided Seller query", + "additionalProperties": false + }, + "Products.Get.Api.V5.Product.SortBy.String": { + "type": "string", + "additionalProperties": false + }, + "Products.Get.Api.V5.Product.SortOrder.String": { + "type": "string", + "additionalProperties": false + }, + "Products.Get.Api.V5.Product.TaxonomyIds.List.Int": { + "description": "Looks for Products variants by their taxonomy id or any descendants of the taxonomies sent separated by comma", + "additionalProperties": false + }, + "Products.Get.Api.V5.Product.VariantId.List.Int": { + "description": "Looks for products that contain a variant with the given ID", + "additionalProperties": false + }, + "Products.Get.Api.V5.Product.VariantStatus.String": { + "description": "Looks for Products with variants that contain provided status", + "additionalProperties": false + }, + "Products.Get.Api.V5.Taxonomy.Forbidden.OneOf.ProblemDetails.HttpValidationProblemDetails": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ProblemDetails" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.HttpValidationProblemDetails" + } + ] + }, + "Products.Get.Api.V5.Taxonomy.Id.Forbidden.OneOf.ProblemDetails.HttpValidationProblemDetails": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ProblemDetails" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.HttpValidationProblemDetails" + } + ] + }, + "Products.Get.Api.V5.Taxonomy.Id.Id.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Products.Get.Api.V5.Taxonomy.Id.Not.Found.OneOf.ProblemDetails.HttpValidationProblemDetails": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ProblemDetails" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.HttpValidationProblemDetails" + } + ] + }, + "Products.Get.Api.V5.Taxonomy.Id.Parent.Forbidden.OneOf.ProblemDetails.HttpValidationProblemDetails": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ProblemDetails" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.HttpValidationProblemDetails" + } + ] + }, + "Products.Get.Api.V5.Taxonomy.Id.Parent.Id.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Products.Get.Api.V5.Taxonomy.Id.Parent.Not.Found.OneOf.ProblemDetails.HttpValidationProblemDetails": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ProblemDetails" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.HttpValidationProblemDetails" + } + ] + }, + "Products.Get.Api.V5.Taxonomy.Id.Parent.Unauthorized.OneOf.ProblemDetails.HttpValidationProblemDetails": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ProblemDetails" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.HttpValidationProblemDetails" + } + ] + }, + "Products.Get.Api.V5.Taxonomy.Id.Unauthorized.OneOf.ProblemDetails.HttpValidationProblemDetails": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ProblemDetails" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.HttpValidationProblemDetails" + } + ] + }, + "Products.Get.Api.V5.Taxonomy.Search.String": { + "type": "string", + "additionalProperties": false + }, + "Products.Get.Api.V5.Taxonomy.Unauthorized.OneOf.ProblemDetails.HttpValidationProblemDetails": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ProblemDetails" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.HttpValidationProblemDetails" + } + ] + }, + "Products.HttpValidationProblemDetails": { + "type": "object", + "additionalProperties": { + "additionalProperties": false + }, + "properties": { + "errors": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + }, + "nullable": true + } + }, + "allOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ProblemDetails" + } + ] + }, + "Products.InventoryViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "inventory_id": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "on_hand_qty": { + "type": "integer", + "format": "int32", + "additionalProperties": false + } + } + }, + "Products.LotInformationRequestModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "is_lot": { + "type": "boolean", + "additionalProperties": false + }, + "minimum_shelf_life_days": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + } + } + }, + "Products.LotInformationViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "is_lot": { + "type": "boolean", + "additionalProperties": false + }, + "minimum_shelf_life_days": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + } + } + }, + "Products.MergeVariantRequestModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "integer", + "format": "int64", + "additionalProperties": false + } + } + }, + "Products.MergeVariantRequestModelArray": { + "type": "array", + "example": [ + { + "id": 0 + } + ], + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.MergeVariantRequestModel" + } + }, + "Products.MergedChildrenViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "channel_ids": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "integer", + "format": "int64", + "additionalProperties": false + }, + "nullable": true + }, + "completed_at": { + "type": "string", + "format": "date-time", + "additionalProperties": false + }, + "inventory_id": { + "type": "integer", + "format": "int64", + "additionalProperties": false, + "nullable": true + }, + "variant_id": { + "type": "integer", + "format": "int64", + "additionalProperties": false + }, + "variant_name": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Products.MigrateVariantRequestModel": { + "type": "object", + "example": { + "category_id": 0, + "name": "string", + "product_id": 0, + "sub_category_id": 0, + "taxonomy_id": 0, + "variants": [ + { + "id": 0, + "name": "string" + } + ] + }, + "additionalProperties": false, + "properties": { + "category_id": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "name": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "product_id": { + "type": "integer", + "format": "int64", + "additionalProperties": false + }, + "sub_category_id": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "taxonomy_id": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "variants": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.VariantToMigrate" + }, + "nullable": true + } + } + }, + "Products.PackagingMaterialTypeViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "name": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Products.PackagingRequirementViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "applicable_categories": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ApplicableCategoryViewModel" + }, + "nullable": true + }, + "applicable_packaging_material_types": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.PackagingMaterialTypeViewModel" + }, + "nullable": true + }, + "applicable_taxonomy": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + }, + "nullable": true + }, + "description": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "name": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Products.PackagingRequirementViewModelArray": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.PackagingRequirementViewModel" + } + }, + "Products.Patch.Api.V5.Product.ProductId.ProductId.Integer": { + "type": "integer", + "format": "int64", + "additionalProperties": false + }, + "Products.Patch.Api.V5.Product.ProductId.Variants.OK.OneOfArray": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.VariantViewModelV5" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.VariantInternalViewModelV5" + } + ] + } + }, + "Products.Patch.Api.V5.Product.ProductId.Variants.ProductId.Integer": { + "type": "integer", + "format": "int64", + "additionalProperties": false + }, + "Products.Post.Api.V5.Product.MoveVariants.Bad.Request.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Products.Post.Api.V5.Product.MoveVariants.Not.Found.OneOf.ProblemDetails.HttpValidationProblemDetails": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ProblemDetails" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.HttpValidationProblemDetails" + } + ] + }, + "Products.Post.Api.V5.Product.ProductId.MoveVariants.Bad.Request.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Products.Post.Api.V5.Product.ProductId.MoveVariants.Not.Found.OneOf.ProblemDetails.HttpValidationProblemDetails": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ProblemDetails" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.HttpValidationProblemDetails" + } + ] + }, + "Products.Post.Api.V5.Product.ProductId.MoveVariants.ProductId.Integer": { + "type": "integer", + "format": "int64", + "additionalProperties": false + }, + "Products.Post.Api.V5.Product.ProductId.Variants.ProductId.Integer": { + "type": "integer", + "format": "int64", + "additionalProperties": false + }, + "Products.Post.Api.V5.Variant.VariantId.Channel.Metadata.Request.OneOf.AmazonChannelMetadataRequestModel.BaseChannelMetadataRequestModel.BigCommerceChannelMetadataRequestModel.ShopifyChannelMetadataRequestModel": { + "example": { + "asin": "string", + "channel_id": 0, + "currency": "string", + "fnsku": "string", + "fulfillment_channel": "string", + "id": 0, + "is_inventory_sync_enabled": true, + "legacy_product_id": 0, + "platform": "string", + "platform_identifier": "string", + "platform_inventory_item_id": "string", + "price": 0.1, + "seller_sku": "string" + }, + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.AmazonChannelMetadataRequestModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BaseChannelMetadataRequestModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BigCommerceChannelMetadataRequestModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ShopifyChannelMetadataRequestModel" + } + ] + }, + "Products.Post.Api.V5.Variant.VariantId.Channel.Metadata.VariantId.Integer": { + "type": "integer", + "format": "int64", + "additionalProperties": false + }, + "Products.Post.Api.V5.Variant.VariantId.ConvertToBundle.VariantId.Integer": { + "type": "integer", + "format": "int64", + "additionalProperties": false + }, + "Products.Post.Api.V5.Variant.VariantId.Merge.VariantId.Integer": { + "type": "integer", + "format": "int64", + "additionalProperties": false + }, + "Products.ProblemDetails": { + "type": "object", + "additionalProperties": { + "additionalProperties": false + }, + "properties": { + "detail": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "instance": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "status": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "title": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "type": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Products.ProductChannelMetadataModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "channel_id": { + "type": "integer", + "format": "int64", + "additionalProperties": false + }, + "channel_name": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "currency": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "integer", + "format": "int64", + "additionalProperties": false, + "nullable": true + }, + "is_inventory_sync_enabled": { + "type": "boolean", + "additionalProperties": false + }, + "legacy_product_id": { + "type": "integer", + "format": "int64", + "additionalProperties": false, + "nullable": true + }, + "platform": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "platform_identifier": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "platform_inventory_item_id": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "price": { + "type": "number", + "format": "double", + "additionalProperties": false + }, + "seller_sku": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Products.ProductViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "category": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.EnumViewModel" + }, + "created_on": { + "type": "string", + "format": "date-time", + "additionalProperties": false + }, + "id": { + "type": "integer", + "format": "int64", + "additionalProperties": false + }, + "name": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "sub_category": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.EnumViewModel" + }, + "taxonomy": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.TaxonomyInformationViewModel" + }, + "type": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "updated_on": { + "type": "string", + "format": "date-time", + "additionalProperties": false, + "nullable": true + }, + "user_id": { + "type": "integer", + "format": "int64", + "additionalProperties": false + }, + "variants": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.VariantViewModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.VariantInternalViewModel" + } + ] + }, + "nullable": true + } + } + }, + "Products.ProductViewModelV5": { + "type": "object", + "additionalProperties": false, + "properties": { + "created_on": { + "type": "string", + "format": "date-time", + "additionalProperties": false + }, + "id": { + "type": "integer", + "format": "int64", + "additionalProperties": false + }, + "name": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "taxonomy": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.TaxonomyInformationViewModel" + }, + "type": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "updated_on": { + "type": "string", + "format": "date-time", + "additionalProperties": false, + "nullable": true + }, + "user_id": { + "type": "integer", + "format": "int64", + "additionalProperties": false + }, + "variants": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.VariantViewModelV5" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.VariantInternalViewModelV5" + } + ] + }, + "nullable": true + } + } + }, + "Products.ProductViewModelV5PagedResponse": { + "type": "object", + "additionalProperties": false, + "properties": { + "first": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "items": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ProductViewModelV5" + }, + "nullable": true + }, + "last": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "next": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "prev": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Products.Put.Api.V5.Variant.VariantId.Channel.Metadata.ChannelMetadataId.Bad.Request.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Products.Put.Api.V5.Variant.VariantId.Channel.Metadata.ChannelMetadataId.ChannelMetadataId.Integer": { + "type": "integer", + "format": "int64", + "additionalProperties": false + }, + "Products.Put.Api.V5.Variant.VariantId.Channel.Metadata.ChannelMetadataId.Not.Found.OneOf.ProblemDetails.HttpValidationProblemDetails": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ProblemDetails" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.HttpValidationProblemDetails" + } + ] + }, + "Products.Put.Api.V5.Variant.VariantId.Channel.Metadata.ChannelMetadataId.OK.OneOf.VariantViewModelV5.VariantInternalViewModelV5": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.VariantViewModelV5" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.VariantInternalViewModelV5" + } + ] + }, + "Products.Put.Api.V5.Variant.VariantId.Channel.Metadata.ChannelMetadataId.Request.OneOf.AmazonChannelMetadataRequestModel.BaseChannelMetadataRequestModel.BigCommerceChannelMetadataRequestModel.ShopifyChannelMetadataRequestModel": { + "example": { + "asin": "string", + "channel_id": 0, + "currency": "string", + "fnsku": "string", + "fulfillment_channel": "string", + "id": 0, + "is_inventory_sync_enabled": true, + "legacy_product_id": 0, + "platform": "string", + "platform_identifier": "string", + "platform_inventory_item_id": "string", + "price": 0.1, + "seller_sku": "string" + }, + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.AmazonChannelMetadataRequestModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BaseChannelMetadataRequestModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BigCommerceChannelMetadataRequestModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ShopifyChannelMetadataRequestModel" + } + ] + }, + "Products.Put.Api.V5.Variant.VariantId.Channel.Metadata.ChannelMetadataId.VariantId.Integer": { + "type": "integer", + "format": "int64", + "additionalProperties": false + }, + "Products.ReturnPreferencesRequestModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "backup_action_id": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "instructions": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "primary_action_id": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "return_to_sender_backup_action_id": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "return_to_sender_primary_action_id": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + } + } + }, + "Products.ReturnPreferencesViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "backup_action": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.EnumViewModel" + }, + "instructions": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "primary_action": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.EnumViewModel" + }, + "return_to_sender_backup_action": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.EnumViewModel" + }, + "return_to_sender_primary_action": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.EnumViewModel" + } + } + }, + "Products.ReviewsPendingType": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "enum": [ + 0, + 1, + 2, + 3, + 4 + ] + }, + "Products.SerialScanRequestModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "exact_character_length": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "is_enabled": { + "type": "boolean", + "additionalProperties": false + }, + "prefix": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "suffix": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Products.SerialScanViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "exact_character_length": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "is_enabled": { + "type": "boolean", + "additionalProperties": false + }, + "prefix": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "suffix": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Products.ShopifyChannelMetadataRequestModel": { + "type": "object", + "description": "Shopify Sales Channel Information", + "additionalProperties": false, + "properties": { + "platform": { + "type": "string", + "readOnly": true, + "additionalProperties": false, + "nullable": true + } + }, + "allOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BaseChannelMetadataRequestModel" + } + ] + }, + "Products.ShopifyChannelMetadataViewModel": { + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ChannelMetadataViewModel" + } + ] + }, + "Products.ShopifyProductChannelMetadataModel": { + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BaseProductChannelMetadataModel" + } + ] + }, + "Products.TaxonomyInformationViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "name": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "parent_id": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "parent_name": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "path": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Products.TaxonomyViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "children": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ChildTaxonomyViewModel" + }, + "nullable": true + }, + "parent": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BaseTaxonomyViewModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ChildTaxonomyViewModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.TaxonomyViewModel" + } + ], + "nullable": true + } + }, + "allOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BaseTaxonomyViewModel" + } + ] + }, + "Products.TaxonomyViewModelArray": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.TaxonomyViewModel" + } + }, + "Products.UpdateProductRequestModelV5": { + "type": "object", + "example": { + "id": 0, + "name": "string", + "taxonomy_id": 0, + "type_id": 0, + "variants": [ + { + "additional_hazmat_attributes": { + "charge_state_percentage": 0.1, + "container_metal": true, + "container_type": "string", + "lithium_battery_packaging": "string", + "lithium_battery_type": "string", + "magnet": true, + "net_volume": 0.1, + "net_weight": 0.1 + }, + "barcodes": [ + { + "sticker_url": "string", + "value": "string" + } + ], + "bundle_definition": [ + { + "quantity": 0, + "variant_id": 0 + } + ], + "channel_metadata": [ + { + "asin": "string", + "channel_id": 0, + "currency": "string", + "fnsku": "string", + "fulfillment_channel": "string", + "id": 0, + "is_inventory_sync_enabled": true, + "legacy_product_id": 0, + "platform": "string", + "platform_identifier": "string", + "platform_inventory_item_id": "string", + "price": 0.1, + "seller_sku": "string" + } + ], + "customs": { + "country_code_of_origin": "string", + "description": "string", + "hs_tariff_code": "string", + "is321_eligible": true, + "value": 0 + }, + "dimension": { + "height": 0.1, + "length": 0.1, + "width": 0.1 + }, + "fulfillment_settings": { + "dangerous_goods": true, + "is_bpm_parcel": true, + "is_case_pick": true, + "msds_url": "string", + "requires_prop65": true, + "serial_scan": { + "exact_character_length": 0, + "is_enabled": true, + "prefix": "string", + "suffix": "string" + } + }, + "gtin": "string", + "id": 0, + "is_digital": true, + "lot_information": { + "is_lot": true, + "minimum_shelf_life_days": 0 + }, + "name": "string", + "packaging_material_type_id": 0, + "packaging_requirement_id": 0, + "return_preferences": { + "backup_action_id": 0, + "instructions": "string", + "primary_action_id": 0, + "return_to_sender_backup_action_id": 0, + "return_to_sender_primary_action_id": 0 + }, + "sku": "string", + "status_id": 0, + "upc": "string", + "weight": 0.1 + } + ] + }, + "additionalProperties": false, + "properties": { + "id": { + "type": "integer", + "description": "Unique reference ID for the product", + "format": "int64", + "additionalProperties": false + }, + "variants": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.UpdateProductVariantRequestModelV5" + }, + "nullable": true + } + }, + "allOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BaseProductRequestModel" + } + ] + }, + "Products.UpdateProductVariantModelV5": { + "type": "object", + "example": { + "additional_hazmat_attributes": { + "charge_state_percentage": 0.1, + "container_metal": true, + "container_type": "string", + "lithium_battery_packaging": "string", + "lithium_battery_type": "string", + "magnet": true, + "net_volume": 0.1, + "net_weight": 0.1 + }, + "barcodes": [ + { + "sticker_url": "string", + "value": "string" + } + ], + "bundle_definition": [ + { + "quantity": 0, + "variant_id": 0 + } + ], + "channel_metadata": [ + { + "asin": "string", + "channel_id": 0, + "channel_name": "string", + "currency": "string", + "fnsku": "string", + "fulfillment_channel": "string", + "id": 0, + "is_inventory_sync_enabled": true, + "legacy_product_id": 0, + "platform": "string", + "platform_identifier": "string", + "platform_inventory_item_id": "string", + "price": 0.1, + "seller_sku": "string" + } + ], + "customs": { + "country_code_of_origin": "string", + "currency": "string", + "description": "string", + "hs_tariff_code": "string", + "is321_eligible": true, + "value": 0 + }, + "dimension": { + "height": 0.1, + "length": 0.1, + "width": 0.1 + }, + "fulfillment_settings": { + "dangerous_goods": true, + "is_bpm_parcel": true, + "is_case_pick": true, + "msds_url": "string", + "requires_prop65": true, + "serial_scan": { + "exact_character_length": 0, + "is_enabled": true, + "prefix": "string", + "suffix": "string" + } + }, + "gtin": "string", + "id": 0, + "is_digital": true, + "lot_information": { + "is_lot": true, + "minimum_shelf_life_days": 0 + }, + "name": "string", + "packaging_material_type_id": 0, + "packaging_requirement_id": 0, + "return_preferences": { + "backup_action_id": 0, + "instructions": "string", + "primary_action_id": 0, + "return_to_sender_backup_action_id": 0, + "return_to_sender_primary_action_id": 0 + }, + "reviews_pending": [ + 0 + ], + "sku": "string", + "status": 1, + "upc": "string", + "weight": 0.1 + }, + "additionalProperties": false, + "properties": { + "barcodes": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BarcodeModel" + }, + "nullable": true + }, + "id": { + "type": "integer", + "format": "int64", + "additionalProperties": false + } + }, + "allOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BaseProductVariantModel" + } + ] + }, + "Products.UpdateProductVariantRequestModelV5": { + "type": "object", + "additionalProperties": false, + "properties": { + "barcodes": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BarcodeRequestModel" + }, + "nullable": true + }, + "id": { + "type": "integer", + "format": "int64", + "additionalProperties": false + } + }, + "allOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BaseProductVariantRequestModel" + } + ] + }, + "Products.VariantInternalViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "compliance": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ComplianceViewModel" + } + }, + "allOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.VariantViewModel" + } + ] + }, + "Products.VariantInternalViewModelV5": { + "type": "object", + "additionalProperties": false, + "properties": { + "compliance": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ComplianceViewModel" + } + }, + "allOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.VariantViewModelV5" + } + ] + }, + "Products.VariantStatus": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "enum": [ + 1, + 2, + 3 + ] + }, + "Products.VariantToMigrate": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "integer", + "format": "int64", + "additionalProperties": false + }, + "name": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Products.VariantViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "barcode": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "barcode_sticker_url": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "channel_metadata": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ChannelMetadataViewModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.AmazonChannelMetadataViewModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BigCommerceChannelMetadataViewModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ShopifyChannelMetadataViewModel" + } + ] + }, + "nullable": true + } + }, + "allOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.VariantViewModelBase" + } + ] + }, + "Products.VariantViewModelBase": { + "type": "object", + "additionalProperties": false, + "properties": { + "additional_hazmat_attributes": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.AdditionalHazmatAttributesViewModel" + }, + "associated_bundles": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.AssociatedBundlesViewModel" + }, + "nullable": true + }, + "bundle_definition": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BundleDefinitionViewModel" + }, + "nullable": true + }, + "created_on": { + "type": "string", + "format": "date-time", + "additionalProperties": false + }, + "customs": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.CustomsViewModel" + }, + "dimension": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.DimensionViewModel" + }, + "fulfillment_settings": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.FulfillmentSettingsViewModel" + }, + "gtin": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "integer", + "format": "int64", + "additionalProperties": false + }, + "inventory": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.InventoryViewModel" + }, + "is_digital": { + "type": "boolean", + "additionalProperties": false + }, + "is_image_uploaded": { + "type": "boolean", + "additionalProperties": false + }, + "lot_information": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.LotInformationViewModel" + }, + "merge_children": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.MergedChildrenViewModel" + }, + "nullable": true + }, + "name": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "packaging_material_type": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.EnumViewModel" + }, + "packaging_requirement": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.EnumViewModel" + }, + "return_preferences": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ReturnPreferencesViewModel" + }, + "reviews_pending": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + }, + "nullable": true + }, + "sku": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "status": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "upc": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "updated_on": { + "type": "string", + "format": "date-time", + "additionalProperties": false, + "nullable": true + }, + "weight": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.WeightViewModel" + } + } + }, + "Products.VariantViewModelV5": { + "type": "object", + "additionalProperties": false, + "properties": { + "barcodes": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BarcodeViewModel" + }, + "nullable": true + }, + "channel_metadata": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ChannelMetadataViewModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.AmazonChannelMetadataViewModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.BigCommerceChannelMetadataViewModel" + }, + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.ShopifyChannelMetadataViewModel" + } + ] + }, + "nullable": true + } + }, + "allOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.VariantViewModelBase" + } + ] + }, + "Products.VariantViewModelV5Array": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Products.VariantViewModelV5" + } + }, + "Products.WeightViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "unit": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "weight": { + "type": "number", + "format": "double", + "additionalProperties": false + } + } + }, + "Receiving.AddBoxItemToBoxModel": { + "type": "object", + "description": "Information about an inventory item contained inside a receiving order box", + "additionalProperties": false, + "required": [ + "inventory_id", + "quantity" + ], + "properties": { + "inventory_id": { + "type": "integer", + "description": "Unique inventory id of the items in the box", + "format": "int32", + "additionalProperties": false + }, + "lot_date": { + "type": "string", + "description": "Lot expiration date for the items in the box", + "format": "date-time", + "additionalProperties": false, + "nullable": true + }, + "lot_number": { + "type": "string", + "description": "Lot number of the items in the box", + "example": "2222", + "additionalProperties": false, + "nullable": true + }, + "quantity": { + "type": "integer", + "description": "Quantity of the items in the box", + "format": "int32", + "maximum": 2147483647.0, + "minimum": 1.0, + "additionalProperties": false + } + } + }, + "Receiving.AddBoxToOrderModel": { + "type": "object", + "description": "Information about a box shipment to be added to a receiving order", + "additionalProperties": false, + "required": [ + "box_items", + "tracking_number" + ], + "properties": { + "box_items": { + "type": "array", + "description": "Items contained in this box", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.AddBoxItemToBoxModel" + }, + "nullable": true + }, + "tracking_number": { + "type": "string", + "description": "Tracking number for the box shipment", + "example": "860C8CDC8F0B4FC7AB69AC86C20539EC", + "additionalProperties": false, + "nullable": true + } + } + }, + "Receiving.AssignOrderToFulfillmentCenterModel": { + "type": "object", + "description": "Model containing information that assigns a receiving order to a fulfillment center.\r\nIf the fulfillment center provided is in a receiving hub region, then the response will be the receiving hub location.", + "additionalProperties": false, + "required": [ + "id" + ], + "properties": { + "id": { + "type": "integer", + "description": "ID of the fulfillment center to assign this receiving order to", + "format": "int32", + "additionalProperties": false + } + } + }, + "Receiving.BoxItemViewModel": { + "type": "object", + "description": "Information about an item contained inside a box as part of a receiving order", + "additionalProperties": false, + "properties": { + "inventory_id": { + "type": "integer", + "description": "Unique identifier of the inventory item", + "format": "int32", + "additionalProperties": false + }, + "lot_date": { + "type": "string", + "description": "Expiration date of the item's lot", + "format": "date-time", + "additionalProperties": false, + "nullable": true + }, + "lot_number": { + "type": "string", + "description": "Lot number the item belongs to", + "additionalProperties": false, + "nullable": true + }, + "quantity": { + "type": "integer", + "description": "Quantity of the item included", + "format": "int32", + "additionalProperties": false + }, + "received_quantity": { + "type": "integer", + "description": "Quantity of the item that was received after processing the receiving order", + "format": "int32", + "additionalProperties": false + }, + "stowed_quantity": { + "type": "integer", + "description": "Quantity of the item that has been stowed", + "format": "int32", + "additionalProperties": false + } + } + }, + "Receiving.BoxStatus": { + "type": "string", + "additionalProperties": false, + "enum": [ + "Awaiting", + "Arrived", + "Completed", + "Counting", + "Stowing", + "Cancelled", + "InternalTransfer" + ] + }, + "Receiving.BoxViewModel": { + "type": "object", + "description": "Information about a box shipment included in a receiving order", + "additionalProperties": false, + "properties": { + "arrived_date": { + "type": "string", + "description": "Date the box arrived", + "format": "date-time", + "additionalProperties": false, + "nullable": true + }, + "box_id": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "box_items": { + "type": "array", + "description": "Information about the items included in the box", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.BoxItemViewModel" + }, + "nullable": true + }, + "box_number": { + "type": "integer", + "description": "The number of the box in the receiving order", + "format": "int32", + "additionalProperties": false + }, + "box_status": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.BoxStatus" + }, + "counting_started_date": { + "type": "string", + "description": "Date counting of the box's inventory items started", + "format": "date-time", + "additionalProperties": false, + "nullable": true + }, + "received_date": { + "type": "string", + "description": "Date the box was received", + "format": "date-time", + "additionalProperties": false, + "nullable": true + }, + "tracking_number": { + "type": "string", + "description": "Tracking number of the box shipment", + "example": "860C8CDC8F0B4FC7AB69AC86C20539EC", + "additionalProperties": false, + "nullable": true + } + } + }, + "Receiving.BoxViewModelArray": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.BoxViewModel" + } + }, + "Receiving.CreateReceivingOrderModel": { + "type": "object", + "description": "Information to create a new receiving order", + "example": { + "box_packaging_type": "EverythingInOneBox", + "boxes": [ + { + "box_items": [ + { + "inventory_id": 0, + "lot_date": "2019-08-24T14:15:22Z", + "lot_number": "2222", + "quantity": 1 + } + ], + "tracking_number": "860C8CDC8F0B4FC7AB69AC86C20539EC" + } + ], + "expected_arrival_date": "2019-08-24T14:15:22Z", + "fulfillment_center": { + "id": 0 + }, + "package_type": "Package", + "purchase_order_number": "string" + }, + "additionalProperties": false, + "required": [ + "box_packaging_type", + "boxes", + "expected_arrival_date", + "fulfillment_center", + "package_type" + ], + "properties": { + "box_packaging_type": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.PackingType" + }, + "boxes": { + "type": "array", + "description": "Box shipments to be added to this receiving order", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.AddBoxToOrderModel" + }, + "nullable": true + }, + "expected_arrival_date": { + "type": "string", + "description": "Expected arrival date of all the box shipments in this receiving order", + "format": "date-time", + "additionalProperties": false + }, + "fulfillment_center": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.AssignOrderToFulfillmentCenterModel" + }, + "package_type": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.PackageType" + }, + "purchase_order_number": { + "type": "string", + "description": "Purchase order number for this receiving order", + "additionalProperties": false, + "nullable": true + } + } + }, + "Receiving.FulfillmentCenterViewModel": { + "type": "object", + "description": "Information about a fulfillment center", + "additionalProperties": false, + "properties": { + "address1": { + "type": "string", + "description": "Address line one of the fulfillment center", + "example": "5900 W Ogden Ave", + "additionalProperties": false, + "nullable": true + }, + "address2": { + "type": "string", + "description": "Address line two of the fulfillment center", + "example": "Suite 100", + "additionalProperties": false, + "nullable": true + }, + "city": { + "type": "string", + "description": "City the fulfillment center is located in", + "example": "Cicero", + "additionalProperties": false, + "nullable": true + }, + "country": { + "type": "string", + "description": "Country the fulfillment center is located in", + "example": "USA", + "additionalProperties": false, + "nullable": true + }, + "email": { + "type": "string", + "description": "Email contact for the fulfillment center", + "example": "example@example.com", + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "integer", + "description": "Unique identifier of the fulfillment center", + "format": "int32", + "additionalProperties": false + }, + "name": { + "type": "string", + "description": "Name of the fulfillment center", + "example": "Cicero (IL)", + "additionalProperties": false, + "nullable": true + }, + "phone_number": { + "type": "string", + "description": "Phone number contact for the fulfillment center", + "example": "555-555-5555", + "additionalProperties": false, + "nullable": true + }, + "state": { + "type": "string", + "description": "State the fulfillment center is located in", + "example": "IL", + "additionalProperties": false, + "nullable": true + }, + "timezone": { + "type": "string", + "description": "Timezone the fulfillment center is located in", + "example": "Central Standard Time", + "additionalProperties": false, + "nullable": true + }, + "zip_code": { + "type": "string", + "description": "Postal code of the fulfillment center", + "example": "60804", + "additionalProperties": false, + "nullable": true + } + } + }, + "Receiving.FulfillmentCenterViewModelArray": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.FulfillmentCenterViewModel" + } + }, + "Receiving.Get.2.0.Receiving.CompletedEndDate.String": { + "type": "string", + "format": "date-time", + "additionalProperties": false + }, + "Receiving.Get.2.0.Receiving.CompletedStartDate.String": { + "type": "string", + "format": "date-time", + "additionalProperties": false + }, + "Receiving.Get.2.0.Receiving.ExternalSync.Boolean": { + "type": "boolean", + "additionalProperties": false + }, + "Receiving.Get.2.0.Receiving.FulfillmentCenterIds.IntegerArray": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "integer", + "format": "int32", + "additionalProperties": false + } + }, + "Receiving.Get.2.0.Receiving.IDs.IntegerArray": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "integer", + "format": "int32", + "additionalProperties": false + } + }, + "Receiving.Get.2.0.Receiving.Id.Boxes.Id.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Receiving.Get.2.0.Receiving.Id.Boxes.Not.Found.OneOf.ValidationProblemDetails": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.ValidationProblemDetails" + } + ] + }, + "Receiving.Get.2.0.Receiving.Id.Id.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Receiving.Get.2.0.Receiving.Id.Labels.Bad.Request.OneOf.ValidationProblemDetails": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.ValidationProblemDetails" + } + ] + }, + "Receiving.Get.2.0.Receiving.Id.Labels.Id.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Receiving.Get.2.0.Receiving.Id.Labels.Not.Found.OneOf.ValidationProblemDetails": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.ValidationProblemDetails" + } + ] + }, + "Receiving.Get.2.0.Receiving.Id.Labels.OK.String": { + "type": "string", + "format": "byte", + "additionalProperties": false + }, + "Receiving.Get.2.0.Receiving.Id.Not.Found.OneOf.ValidationProblemDetails": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.ValidationProblemDetails" + } + ] + }, + "Receiving.Get.2.0.Receiving.InsertEndDate.String": { + "type": "string", + "format": "date-time", + "additionalProperties": false + }, + "Receiving.Get.2.0.Receiving.InsertStartDate.String": { + "type": "string", + "format": "date-time", + "additionalProperties": false + }, + "Receiving.Get.2.0.Receiving.Limit.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Receiving.Get.2.0.Receiving.Not.Found.OneOf.ValidationProblemDetails": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.ValidationProblemDetails" + } + ] + }, + "Receiving.Get.2.0.Receiving.OK.Next.Page.String": { + "type": "string", + "additionalProperties": false + }, + "Receiving.Get.2.0.Receiving.OK.Page.Number.Int": { + "additionalProperties": false + }, + "Receiving.Get.2.0.Receiving.OK.Page.Size.Int": { + "additionalProperties": false + }, + "Receiving.Get.2.0.Receiving.OK.Total.Count.Int": { + "additionalProperties": false + }, + "Receiving.Get.2.0.Receiving.OK.Total.Pages.Int": { + "additionalProperties": false + }, + "Receiving.Get.2.0.Receiving.Page.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Receiving.Get.2.0.Receiving.PurchaseOrderNumbers.StringArray": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + }, + "Receiving.PackageType": { + "type": "string", + "additionalProperties": false, + "enum": [ + "Package", + "Pallet", + "FloorLoadedContainer" + ] + }, + "Receiving.PackingType": { + "type": "string", + "additionalProperties": false, + "enum": [ + "EverythingInOneBox", + "OneSkuPerBox", + "MultipleSkuPerBox" + ] + }, + "Receiving.Post.2.0.Receiving.Bad.Request.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Receiving.Post.2.0.Receiving.Id.Cancel.Id.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Receiving.Post.2.0.Receiving.Id.Cancel.Not.Found.OneOf.ValidationProblemDetails": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.ValidationProblemDetails" + } + ] + }, + "Receiving.Post.2.0.Receiving.Id.Cancel.Unprocessable.Entity.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Receiving.Post.2.0.Receiving.Not.Found.OneOf.ValidationProblemDetails": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.ValidationProblemDetails" + } + ] + }, + "Receiving.Post.2.0.Receiving.Set.External.Sync.Bad.Request.Object": { + "type": "object", + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + } + }, + "Receiving.ReceivingStatus": { + "type": "string", + "additionalProperties": false, + "enum": [ + "Awaiting", + "Processing", + "Completed", + "Cancelled", + "Incomplete", + "Arrived", + "PartiallyArrived", + "PartiallyArrivedAtHub", + "ArrivedAtHub", + "ProcessingAtHub", + "InternalTransfer" + ] + }, + "Receiving.ReceivingStatusArray": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.ReceivingStatus" + } + }, + "Receiving.UpdateExternalSyncModel": { + "type": "object", + "example": { + "ids": [ + 0 + ], + "is_external_sync": true + }, + "additionalProperties": false, + "properties": { + "ids": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "nullable": true + }, + "is_external_sync": { + "type": "boolean", + "additionalProperties": false + } + } + }, + "Receiving.V2.InventoryQuantityViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "expected_quantity": { + "type": "integer", + "description": "Quantity of the inventory item submitted in the WRO", + "format": "int32", + "additionalProperties": false + }, + "inventory_id": { + "type": "integer", + "description": "ID of the inventory item", + "format": "int32", + "additionalProperties": false + }, + "received_quantity": { + "type": "integer", + "description": "Quantity of the inventory item received by the warehouse", + "format": "int32", + "additionalProperties": false + }, + "sku": { + "type": "string", + "description": "Sku of the inventory item", + "additionalProperties": false, + "nullable": true + }, + "stowed_quantity": { + "type": "integer", + "description": "Quantity of the inventory item stowed by the warehouse", + "format": "int32", + "additionalProperties": false + } + } + }, + "Receiving.V2.ReceivingOrderStatusHistoryViewModel": { + "type": "object", + "description": "View model for receiving order status history", + "additionalProperties": false, + "properties": { + "id": { + "type": "integer", + "description": "Unique id of the status", + "format": "int32", + "additionalProperties": false + }, + "status": { + "type": "string", + "description": "Name of the status", + "example": "Processing", + "additionalProperties": false, + "nullable": true + }, + "timestamp": { + "type": "string", + "description": "Timestamp when the status was recorded", + "format": "date-time", + "additionalProperties": false + } + } + }, + "Receiving.V2.WarehouseReceivingOrderViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "box_labels_uri": { + "type": "string", + "description": "URL to the packing slip to be included in each box shipment for this receiving order", + "example": "https://api.shipbob.com/1.0/receiving/1/labels", + "additionalProperties": false, + "nullable": true + }, + "box_packaging_type": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.PackingType" + }, + "expected_arrival_date": { + "type": "string", + "description": "Expected date that all packages will have arrived", + "format": "date-time", + "additionalProperties": false + }, + "external_sync_timestamp": { + "type": "string", + "description": "The timestamp in UTC when a 3rd party integrator has set in our system", + "format": "date-time", + "additionalProperties": false, + "nullable": true + }, + "fulfillment_center": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.FulfillmentCenterViewModel" + }, + "id": { + "type": "integer", + "description": "Unique id of the warehouse receiving order", + "format": "int32", + "additionalProperties": false + }, + "insert_date": { + "type": "string", + "description": "Insert date of the receiving order", + "format": "date-time", + "additionalProperties": false + }, + "inventory_quantities": { + "type": "array", + "description": "Inventory items and quantities within the WRO", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.V2.InventoryQuantityViewModel" + }, + "nullable": true + }, + "last_updated_date": { + "type": "string", + "description": "Last date the receiving order was updated", + "format": "date-time", + "additionalProperties": false + }, + "package_type": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.PackageType" + }, + "purchase_order_number": { + "type": "string", + "description": "Purchase order number for a receiving order", + "additionalProperties": false, + "nullable": true + }, + "status": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.ReceivingStatus" + }, + "status_history": { + "type": "array", + "description": "The history of status changes for this receiving order", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.V2.ReceivingOrderStatusHistoryViewModel" + }, + "nullable": true + } + } + }, + "Receiving.V2.WarehouseReceivingOrderViewModelArray": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Receiving.V2.WarehouseReceivingOrderViewModel" + } + }, + "Receiving.ValidationProblemDetails": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": false + }, + "properties": { + "detail": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "errors": { + "type": "object", + "readOnly": true, + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + }, + "nullable": true + }, + "instance": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "status": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "title": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "type": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Returns.ChannelInfoViewModel": { + "type": "object", + "description": "Created by channel metadata", + "additionalProperties": false, + "properties": { + "id": { + "type": "integer", + "description": "Unique id of the channel", + "format": "int32", + "additionalProperties": false + }, + "name": { + "type": "string", + "description": "Name of the channel", + "example": "ShipBobs-Shopify-Store", + "additionalProperties": false, + "nullable": true + } + } + }, + "Returns.CreateReturnRequest": { + "type": "object", + "example": { + "fulfillment_center": { + "id": 0, + "name": "string" + }, + "inventory": [ + { + "id": 0, + "lotDate": "2019-08-24T14:15:22Z", + "lot_number": "string", + "quantity": 0, + "requested_action": 0 + } + ], + "original_shipment_id": 0, + "reference_id": "string", + "tracking_number": "string" + }, + "additionalProperties": false, + "properties": { + "fulfillmentCenter": { + "additionalProperties": false, + "$ref": "#/components/schemas/Returns.Facility" + }, + "inventory": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Returns.ReturnInventory" + }, + "nullable": true + }, + "original_shipment_id": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "reference_id": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "tracking_number": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Returns.CreateReturnViewModel": { + "type": "object", + "example": { + "fulfillment_center": { + "id": 0, + "name": "Cicero (IL)" + }, + "inventory": [ + { + "id": 111222, + "quantity": 1, + "requested_action": "Default" + } + ], + "original_shipment_id": 123456, + "reference_id": "ShipBob_Return_123", + "tracking_number": "1Z9999999999999999" + }, + "additionalProperties": false, + "required": [ + "fulfillment_center", + "inventory", + "reference_id" + ], + "properties": { + "fulfillment_center": { + "additionalProperties": false, + "$ref": "#/components/schemas/Returns.FulfillmentCenterViewModel" + }, + "inventory": { + "type": "array", + "description": "Array of inventory items being returned", + "minLength": 1, + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Returns.ReturnInventoryViewModel" + }, + "nullable": true + }, + "original_shipment_id": { + "type": "integer", + "description": "Shipment from which the items in the return originated", + "format": "int32", + "example": 123456, + "additionalProperties": false, + "nullable": true + }, + "reference_id": { + "type": "string", + "description": "Client-defined external unique identifier for the return order", + "maxLength": 50, + "example": "ShipBob_Return_123", + "additionalProperties": false, + "nullable": true + }, + "tracking_number": { + "type": "string", + "description": "Tracking number for the return shipment", + "maxLength": 500, + "example": "1Z9999999999999999", + "additionalProperties": false, + "nullable": true + } + } + }, + "Returns.Facility": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "name": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Returns.FulfillmentCenterViewModel": { + "type": "object", + "description": "Information about a fulfillment center", + "additionalProperties": false, + "required": [ + "id" + ], + "properties": { + "id": { + "type": "integer", + "description": "Unique identifier of the fulfillment center", + "format": "int32", + "additionalProperties": false + }, + "name": { + "type": "string", + "description": "Name of the fulfillment center", + "example": "Cicero (IL)", + "additionalProperties": false, + "nullable": true + } + } + }, + "Returns.Get.Api.Public.Id.Id.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Returns.Get.Api.Public.Id.Shipbob.Channel.Id.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Returns.Get.Api.V2.Public.Search.Completed.End.Date.String": { + "type": "string", + "format": "date-time", + "additionalProperties": false + }, + "Returns.Get.Api.V2.Public.Search.Completed.Start.Date.String": { + "type": "string", + "format": "date-time", + "additionalProperties": false + }, + "Returns.Get.Api.V2.Public.Search.Cursor.Integer": { + "type": "integer", + "format": "int32", + "maximum": 2147483647.0, + "minimum": 1.0, + "additionalProperties": false + }, + "Returns.Get.Api.V2.Public.Search.End.Date.String": { + "type": "string", + "format": "date-time", + "additionalProperties": false + }, + "Returns.Get.Api.V2.Public.Search.Fulfillment.Center.Ids.String": { + "type": "string", + "additionalProperties": false + }, + "Returns.Get.Api.V2.Public.Search.Ids.String": { + "type": "string", + "additionalProperties": false + }, + "Returns.Get.Api.V2.Public.Search.Inventory.Ids.String": { + "type": "string", + "additionalProperties": false + }, + "Returns.Get.Api.V2.Public.Search.Limit.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Returns.Get.Api.V2.Public.Search.OK.Page.Number.String": { + "type": "string", + "description": "Current page number", + "format": "", + "additionalProperties": false + }, + "Returns.Get.Api.V2.Public.Search.OK.Page.Size.String": { + "type": "string", + "description": "Page size", + "format": "", + "additionalProperties": false + }, + "Returns.Get.Api.V2.Public.Search.OK.Total.Count.String": { + "type": "string", + "description": "Total records", + "format": "", + "additionalProperties": false + }, + "Returns.Get.Api.V2.Public.Search.OK.Total.Pages.String": { + "type": "string", + "description": "Total pages", + "format": "", + "additionalProperties": false + }, + "Returns.Get.Api.V2.Public.Search.Original.Shipment.Ids.String": { + "type": "string", + "additionalProperties": false + }, + "Returns.Get.Api.V2.Public.Search.Reference.Ids.String": { + "type": "string", + "additionalProperties": false + }, + "Returns.Get.Api.V2.Public.Search.Return.Actions.String": { + "type": "string", + "additionalProperties": false + }, + "Returns.Get.Api.V2.Public.Search.Return.Types.String": { + "type": "string", + "additionalProperties": false + }, + "Returns.Get.Api.V2.Public.Search.Shipbob.Channel.Id.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Returns.Get.Api.V2.Public.Search.Sort.By.String": { + "type": "string", + "additionalProperties": false + }, + "Returns.Get.Api.V2.Public.Search.Start.Date.String": { + "type": "string", + "format": "date-time", + "additionalProperties": false + }, + "Returns.Get.Api.V2.Public.Search.Status.String": { + "type": "string", + "additionalProperties": false + }, + "Returns.Get.Api.V2.Public.Search.Store.Order.Ids.String": { + "type": "string", + "additionalProperties": false + }, + "Returns.Get.Api.V2.Public.Search.Tracking.Numbers.String": { + "type": "string", + "additionalProperties": false + }, + "Returns.InventoryItemViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "action_requested": { + "additionalProperties": false, + "$ref": "#/components/schemas/Returns.ReturnActionRequestedViewModel" + }, + "action_taken": { + "type": "array", + "description": "Action(s) taken when processing the return", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Returns.ReturnActionTakenViewModel" + }, + "nullable": true + }, + "id": { + "type": "integer", + "description": "Unique id of the inventory item", + "format": "int32", + "additionalProperties": false + }, + "name": { + "type": "string", + "description": "Name of the inventory item", + "additionalProperties": false, + "nullable": true + }, + "quantity": { + "type": "integer", + "description": "Quantity expected to be processed with the return", + "format": "int32", + "additionalProperties": false + } + } + }, + "Returns.LotInformationViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "expiration_date": { + "type": "string", + "format": "date-time", + "additionalProperties": false + }, + "lot_number": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "quantity_processed": { + "type": "integer", + "format": "int32", + "additionalProperties": false + } + } + }, + "Returns.Post.1.0.Return.Id.Cancel.Id.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Returns.Post.1.0.Return.Id.Cancel.Not.Found.OneOf.ValidationProblemDetails": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Returns.ValidationProblemDetails" + } + ] + }, + "Returns.Post.1.0.Return.Id.Cancel.Shipbob.Channel.Id.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Returns.Post.1.0.Return.Id.Cancel.Unprocessable.Entity.OneOf.ValidationProblemDetails": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Returns.ValidationProblemDetails" + } + ] + }, + "Returns.Post.Api.Public.Create.CreationSourceId.Integer": { + "type": "integer", + "format": "int32", + "default": 3, + "additionalProperties": false + }, + "Returns.Post.Api.Public.Create.Shipbob.Channel.Id.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Returns.Put.1.0.Return.Id.Bad.Request.OneOf.ValidationProblemDetails": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Returns.ValidationProblemDetails" + } + ] + }, + "Returns.Put.1.0.Return.Id.Id.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Returns.Put.1.0.Return.Id.Shipbob.Channel.Id.Integer": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "Returns.Put.1.0.Return.Id.Unprocessable.Entity.OneOf.ValidationProblemDetails": { + "additionalProperties": false, + "oneOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Returns.ValidationProblemDetails" + } + ] + }, + "Returns.ReturnAction": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "enum": [ + 0, + 1, + 2, + 3 + ] + }, + "Returns.ReturnActionRequestedViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "action": { + "additionalProperties": false, + "$ref": "#/components/schemas/Returns.ReturnAction" + }, + "action_type": { + "additionalProperties": false, + "$ref": "#/components/schemas/Returns.ReturnActionSource" + }, + "instructions": { + "type": "string", + "description": "Specific instructions to be taken for the inventory when processing the return", + "additionalProperties": false, + "nullable": true + } + } + }, + "Returns.ReturnActionSource": { + "type": "string", + "additionalProperties": false, + "enum": [ + "InventoryDefault", + "Override" + ] + }, + "Returns.ReturnActionTakenViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "action": { + "additionalProperties": false, + "$ref": "#/components/schemas/Returns.ReturnAction" + }, + "action_reason": { + "type": "string", + "description": "Reason the given action was taken", + "additionalProperties": false, + "nullable": true + }, + "lot_information": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Returns.LotInformationViewModel" + }, + "nullable": true + }, + "quantity_processed": { + "type": "integer", + "description": "Quantity of inventory processed with the taken action", + "format": "int32", + "maximum": 2147483647.0, + "minimum": 1.0, + "additionalProperties": false + } + } + }, + "Returns.ReturnInventory": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "lot_date": { + "type": "string", + "format": "date-time", + "additionalProperties": false, + "nullable": true + }, + "lot_number": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "quantity": { + "type": "integer", + "format": "int32", + "additionalProperties": false + }, + "requested_action": { + "additionalProperties": false, + "$ref": "#/components/schemas/Returns.ReturnAction" + } + } + }, + "Returns.ReturnInventoryViewModel": { + "type": "object", + "additionalProperties": false, + "required": [ + "id", + "quantity" + ], + "properties": { + "id": { + "type": "integer", + "description": "ID of the inventory item to return", + "format": "int32", + "example": 111222, + "additionalProperties": false + }, + "quantity": { + "type": "integer", + "description": "Quantity of the returned inventory item in the return", + "format": "int32", + "maximum": 2147483647.0, + "minimum": 1.0, + "example": 1, + "additionalProperties": false + }, + "requested_action": { + "additionalProperties": false, + "$ref": "#/components/schemas/Returns.ReturnAction" + } + } + }, + "Returns.ReturnOrderViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "channel": { + "additionalProperties": false, + "$ref": "#/components/schemas/Returns.ChannelInfoViewModel" + }, + "completed_date": { + "type": "string", + "description": "Completed date for a return order.", + "format": "date-time", + "additionalProperties": false, + "nullable": true + }, + "customer_name": { + "type": "string", + "description": "Customer name from the related shipment.", + "additionalProperties": false, + "nullable": true + }, + "fulfillment_center": { + "additionalProperties": false, + "$ref": "#/components/schemas/Returns.FulfillmentCenterViewModel" + }, + "id": { + "type": "integer", + "description": "Unique id of the Return Order", + "format": "int32", + "additionalProperties": false + }, + "insert_date": { + "type": "string", + "description": "Date this return order was created", + "format": "date-time", + "additionalProperties": false + }, + "inventory": { + "type": "array", + "description": "List of inventory included in the return order", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Returns.InventoryItemViewModel" + }, + "nullable": true + }, + "invoice_amount": { + "type": "number", + "description": "Invoiced amount of return order (sum of transaction amounts)", + "format": "double", + "additionalProperties": false, + "nullable": true + }, + "original_shipment_id": { + "type": "integer", + "description": "Id of the corresponding shipment that is the souce of the return", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "reference_id": { + "type": "string", + "description": "Client-defined external unique id of the return order", + "additionalProperties": false, + "nullable": true + }, + "return_type": { + "additionalProperties": false, + "$ref": "#/components/schemas/Returns.ReturnType" + }, + "status": { + "additionalProperties": false, + "$ref": "#/components/schemas/Returns.ReturnStatus" + }, + "store_order_id": { + "type": "string", + "description": "Store order for the related shipment.", + "additionalProperties": false, + "nullable": true + }, + "tracking_number": { + "type": "string", + "description": "Tracking number of the return shipment", + "example": "860C8CDC8F0B4FC7AB69AC86C20539EC", + "additionalProperties": false, + "nullable": true + }, + "transactions": { + "type": "array", + "description": "Array of transactions affiliated with the return order", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Returns.TransactionViewModel" + }, + "nullable": true + } + } + }, + "Returns.ReturnStatus": { + "type": "string", + "additionalProperties": false, + "enum": [ + "AwaitingArrival", + "Arrived", + "Processing", + "Completed", + "Cancelled" + ] + }, + "Returns.ReturnType": { + "type": "string", + "additionalProperties": false, + "enum": [ + "Regular", + "ReturnToSender" + ] + }, + "Returns.SortOrder": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "enum": [ + 0, + 1 + ] + }, + "Returns.TransactionLogSource": { + "type": "string", + "additionalProperties": false, + "enum": [ + "ReturnLabelInvoice", + "ReturnProcessingFee", + "ReturnToSenderFee" + ] + }, + "Returns.TransactionViewModel": { + "type": "object", + "additionalProperties": false, + "properties": { + "amount": { + "type": "number", + "description": "Transaction amount in dollars", + "format": "double", + "example": 2.5, + "additionalProperties": false + }, + "transaction_type": { + "additionalProperties": false, + "$ref": "#/components/schemas/Returns.TransactionLogSource" + } + } + }, + "Returns.ValidationProblemDetails": { + "type": "object", + "additionalProperties": false, + "properties": { + "detail": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "errors": { + "type": "object", + "readOnly": true, + "additionalProperties": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + }, + "nullable": true + }, + "extensions": { + "type": "object", + "readOnly": true, + "additionalProperties": { + "type": "object", + "additionalProperties": false + }, + "nullable": true + }, + "instance": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "status": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "title": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "type": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Webhooks.ActionResult": { + "type": "object", + "discriminator": { + "propertyName": "$type" + }, + "additionalProperties": false, + "required": [ + "$type" + ], + "properties": { + "$type": { + "type": "string", + "additionalProperties": false + } + } + }, + "Webhooks.BadRequestObjectResult": { + "additionalProperties": false, + "allOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Webhooks.ObjectResult" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "content_types": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + }, + "nullable": true + }, + "declared_type": { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "type": "string", + "additionalProperties": false + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "type": "string", + "additionalProperties": false + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "type": "string", + "additionalProperties": false + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "type": "string", + "additionalProperties": false + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + } + ], + "nullable": true + }, + "formatters": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Webhooks.IOutputFormatter" + }, + "nullable": true + }, + "status_code": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "value": { + "type": "object", + "additionalProperties": false, + "nullable": true + } + } + } + ] + }, + "Webhooks.Delete.V2.Webhook.Id.Id.String": { + "type": "string", + "description": "This is the id of the webhook subscription to delete", + "additionalProperties": false, + "nullable": true + }, + "Webhooks.Get.V2.Webhook.Cursor.String": { + "type": "string", + "description": "The number of records to skip before starting to return the results. Used for pagination.", + "additionalProperties": false, + "nullable": true + }, + "Webhooks.Get.V2.Webhook.RecordsPerPage.Integer": { + "type": "integer", + "description": "Number of webhooks returned per page in a paginated response.", + "format": "int32", + "maximum": 250.0, + "minimum": 1.0, + "additionalProperties": false + }, + "Webhooks.GetWebhookResponse": { + "type": "object", + "additionalProperties": false, + "properties": { + "items": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Webhooks.V2.WebhookViewModelV2" + }, + "nullable": true + }, + "next": { + "type": "string", + "additionalProperties": false, + "nullable": true + }, + "prev": { + "type": "string", + "additionalProperties": false, + "nullable": true + } + } + }, + "Webhooks.IOutputFormatter": { + "type": "object", + "additionalProperties": false + }, + "Webhooks.ObjectResult": { + "additionalProperties": false, + "allOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Webhooks.ActionResult" + }, + { + "type": "object", + "discriminator": { + "propertyName": "$type" + }, + "additionalProperties": false, + "required": [ + "$type" + ], + "properties": { + "content_types": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + }, + "nullable": true + }, + "declared_type": { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "type": "string", + "additionalProperties": false + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "type": "string", + "additionalProperties": false + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "type": "string", + "additionalProperties": false + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "type": "string", + "additionalProperties": false + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + } + ], + "nullable": true + }, + "formatters": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Webhooks.IOutputFormatter" + }, + "nullable": true + }, + "status_code": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "value": { + "type": "object", + "additionalProperties": false, + "nullable": true + } + } + } + ] + }, + "Webhooks.UnprocessableEntityObjectResult": { + "additionalProperties": false, + "allOf": [ + { + "additionalProperties": false, + "$ref": "#/components/schemas/Webhooks.ObjectResult" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "content_types": { + "type": "array", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + }, + "nullable": true + }, + "declared_type": { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "type": "string", + "additionalProperties": false + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "type": "string", + "additionalProperties": false + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "type": "string", + "additionalProperties": false + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "type": "string", + "additionalProperties": false + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "additionalProperties": false, + "oneOf": [ + { + "type": "string", + "additionalProperties": false + } + ] + }, + { + "type": "string", + "additionalProperties": false + }, + { + "type": "string", + "additionalProperties": false + } + ], + "nullable": true + }, + "formatters": { + "type": "array", + "additionalProperties": false, + "items": { + "additionalProperties": false, + "$ref": "#/components/schemas/Webhooks.IOutputFormatter" + }, + "nullable": true + }, + "status_code": { + "type": "integer", + "format": "int32", + "additionalProperties": false, + "nullable": true + }, + "value": { + "type": "object", + "additionalProperties": false, + "nullable": true + } + } + } + ] + }, + "Webhooks.V2.Create.WebhookViewModelV2": { + "type": "object", + "additionalProperties": false, + "properties": { + "created_at": { + "type": "string", + "description": "TimeStamp the webhook subscription was created", + "format": "date-time", + "additionalProperties": false + }, + "description": { + "type": "string", + "description": "Description of the webhook subscription", + "additionalProperties": false, + "nullable": true + }, + "id": { + "type": "string", + "description": "ID of the webhook subscription", + "example": "12345", + "additionalProperties": false, + "nullable": true + }, + "secret": { + "type": "string", + "description": "A secret key used to sign the webhook payload for verifying its authenticity on the receiver's end.", + "pattern": "^whsec_[a-zA-Z0-9+/]{32}$", + "additionalProperties": false, + "nullable": true + }, + "topics": { + "type": "array", + "description": "List of event types the webhook will receive notifications for", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + }, + "nullable": true + }, + "url": { + "type": "string", + "description": "URL subscription events will be posted to", + "additionalProperties": false, + "nullable": true + } + } + }, + "Webhooks.V2.CreateSubscriptionRequest": { + "type": "object", + "example": { + "description": "string", + "secret": "string", + "topics": [ + "string" + ], + "url": "https://mywebsite.com/shipbob/handler" + }, + "additionalProperties": false, + "required": [ + "topics", + "url" + ], + "properties": { + "description": { + "type": "string", + "description": "Description of the webhook subscription.", + "additionalProperties": false, + "nullable": true + }, + "secret": { + "type": "string", + "description": "A secret key used to sign the webhook payload for verifying its authenticity on the receiver's end.", + "pattern": "^whsec_[a-zA-Z0-9+/]{32}$", + "additionalProperties": false, + "nullable": true + }, + "topics": { + "type": "array", + "description": "The event types for which webhook callbacks will be received.", + "minLength": 1, + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + } + }, + "url": { + "type": "string", + "description": "The URL that will be called when an event matching the subscription topic occurs.\r\nThe URL must use HTTPS, accept POST requests, and handle content of type application/json.", + "format": "uri", + "example": "https://mywebsite.com/shipbob/handler", + "additionalProperties": false + } + } + }, + "Webhooks.V2.WebhookViewModelV2": { + "type": "object", + "additionalProperties": false, + "properties": { + "created_at": { + "type": "string", + "description": "TimeStamp the webhook subscription was created", + "format": "date-time", + "additionalProperties": false + }, + "description": { + "type": "string", + "description": "Description of the webhook subscription", + "additionalProperties": false, + "nullable": true + }, + "enabled": { + "type": "boolean", + "description": "TimeStamp the webhook subscription was created", + "additionalProperties": false + }, + "id": { + "type": "string", + "description": "ID of the webhook subscription", + "example": "12345", + "additionalProperties": false, + "nullable": true + }, + "topics": { + "type": "array", + "description": "List of event types the webhook will receive notifications for", + "additionalProperties": false, + "items": { + "type": "string", + "additionalProperties": false + }, + "nullable": true + }, + "url": { + "type": "string", + "description": "URL subscription events will be posted to", + "additionalProperties": false, + "nullable": true + } + } + } + }, + "securitySchemes": { + "PAT": { + "type": "http", + "scheme": "bearer", + "bearerFormat": "PAT", + "description": "Authentication using Personal Access Token (PAT) token" + }, + "OAuth2": { + "type": "oauth2", + "flows": { + "authorizationCode": { + "authorizationUrl": "https://auth.shipbob.com/connect/authorize", + "tokenUrl": "https://auth.shipbob.com/connect/token", + "scopes": { + "channels_read": "Read channel metadata", + "channels_write": "Write channel metadata", + "inventory_read": "Access inventory read operations", + "inventory_write": "Access inventory write operations", + "orders_read": "Access orders read operations", + "orders_write": "Access orders write operations", + "products_read": "Access products read operations", + "products_write": "Access products write operations", + "receiving_read": "Access receiving read operations", + "receiving_write": "Access receiving write operations", + "returns_read": "Access returns read operations", + "returns_write": "Access returns write operations", + "webhooks_read": "Access webhooks read operations", + "webhooks_write": "Access webhooks write operations", + "locations_read": "Access locations read operations" + } + } + }, + "description": "OAuth2 authentication using JWT tokens" + } + } + } +} \ No newline at end of file